I have three entities.
First x second y third z
public int Id { get; set; }public ICollection<y> y{ get; set; }public virtual z z{ get; set; }
For Y
public int Id { get; set; }public int xID{ get; set; }public x x { get; set; }
For Z
public int Id { get; set; }public int xId { get; set; }public x x { get; set; }
When I try to return await _context.x.ToListAsync();
y and z column null. Why is that? How to connect each other?
I used fluent API for relationship.
Actually I need this query. How to write async?
Select table1.ID ,table1.Name from Table1 inner join Table2 on Table1 .ID =Table2 .ID inner join Table3 on table2.ID=Table3 .ID