带有ANY的实体框架子查询

时间:2013-02-12 07:08:06

标签: c# entity-framework

请我帮忙 我试图用实体框架做这个,但我不知道该怎么做。

SELECT * FROM PJT.Notifications
WHERE ProjectProgrssID = ANY(
SELECT ProjectProgressID FROM PJT.ProjectProgress
WHERE ProjectID = ANY(
SELECT ProjectID FROM PJT.Projects WHERE UniversityID = 1))

1 个答案:

答案 0 :(得分:1)

试试这个:

Projects.Where(p => p.UniversityId = 1)
    .SelectMany(pp => pp.ProjectProgress)
    .SelectMany(pr => pr.Notifications);