Reputation: 5042
I'm setting up a context to be read as follows:
Now, the last include is a collection and each entity in that collection has a relation (1-to-1) to an entity called SERVICE_INFO
How do I include that entity on each BILL_INFO_DETAIL
?
Upvotes: 1
Views: 98
Reputation: 394
If I understood you correctly. Maybe what you want is the ThenInclude()
.Include( i=> i.BILL_INFO_DETAIL).ThenInclude(b => b.SERVICE_INFO)
Upvotes: 1
Reputation: 124
Maybe you can just use ,if there is navigation properties in table(BILL_INFO_DETAI):
Include( i=> i.BILL_INFO_DETAIL.SELECT( b => b.SERVICE_INFO ));
reference:https://learn.microsoft.com/zh-tw/ef/ef6/querying/related-data
Upvotes: 1