4

我似乎无法找到如何在 EF 中急切加载多个子子集合。所以我可以这样做:

blawConext.Blaws
    .Include(b => b.ChildCollection
             .Select(cc => cc.ChildChildCollection)
     )

我什至可以毫无问题地越来越深入,但我无法获得 umm 同行?收藏,以下不起作用

blawConext.Blaws
    .Include(b => b.ChildCollection
             .Select(cc => cc.ChildChildCollection1)
             .Select(cc => cc.ChildChildCollection2)
     )
4

1 回答 1

4

您可以指定多个包括:

blawConext.Blaws
    .Include(b => b.ChildCollection.Select(cc => cc.ChildChildCollection1))
    .Include(b => b.ChildCollection.Select(cc => cc.ChildChildCollection2))
于 2013-02-07T20:38:32.523 回答