Muhammad Al-Own
Muhammad Al-Own

Reputation: 237

Entity Framework Subquery with ANY

please I need help am trying to do this with entity framework but I don't know how to do it.

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

Upvotes: 2

Views: 410

Answers (1)

JMan
JMan

Reputation: 2629

Try this:

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

Upvotes: 1

Related Questions