I have a database with four tables. TableA and TableB are the main tables and the TableC is the table of the many to many relationships.
- TableA(IDTableA, Name...)
- TableB(IDTableB, Name...)
- TableC(IDTableA, IDTableB)
This create three entities, The EntityA has an ICollection of Entity C and Entity C has a Collection of EntitiesB, so when I try to get the related entities I do this:
myContext.EntityA.Include(a=>a.EntityB.Select(b=>b.EntityC));
But this throw and exception that says that the collection is null.
So I would like to know if it is possible to do an eager loading when there are a table for the many to many relationship.
Thanks.