Reputation: 311
Suppose I have the following three tables
There is 1 to many relationship between the tables as follows:
I am using Entity framework to query the table and the programming is in C#. Suppose, I need all the columns in A, I do the following:
var query = _context.A;
query.where( <where clause> )
If I need to include the columns of B to prevent lazy loading,
query.Include ( s => s.B );
The question is, how do I include the columns of C to prevent lazy loading? I am looking for something like:
query.Include ( s => s.B.C )
( This does not work because of the 1 to many relationship between the tables )
Upvotes: 0
Views: 68