Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 3663

How to join three table rest API .net core 5?

$
0
0

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 

Viewing all articles
Browse latest Browse all 3663

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>