c# - Entity Framework recursively include collection for each entity from included collection -
I have the following locations where I am trying to include people's addresses in countries.
Country country = _db. Country. Included (P => P. CT people. ????) Where (....) Not sure how to do this work?
From:
Collection, a compilation and a reference below Level:
query.Include (e => e.level1collection.Select (l1 = & gt; l1.Level2Collection.Select (l2 = & gt; l2.Level3Reference))). Then try your case
country country = _db.Countries. Include (C = & gt; c.Cities.Select (cc = & gt; cc.People.Select (p = & gt; p.Addresses))). Where (....) To access this extension method, it is necessary to use the instructional System.Data.Entity;
Comments
Post a Comment