实体框架包含多个选择

agr*_*ton 5 c# entity-framework

这是我试图用实体框架完成的一个例子。有没有办法做到这一点?

//This throws an exception because I'm including Items1 twice. But I need both Lists for each Item1
context.MainItems.Include(x=>x.Item1s.Select(y=>y.SubItems1.Select(z=>z.SubSubItem)))
                 .Include(x=>x.Item1s.Select(y=>y.SubItems2))
Run Code Online (Sandbox Code Playgroud)