实体框架包含多个选择

时间:2014-06-24 01:23:34

标签: c# entity-framework

以下是我尝试使用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))

0 个答案:

没有答案