I am trying to learn LINQ and I went to couple of posts dealing with same issue but cant wrap my head around it.
How do I write below query in LINQ?
SELECT 1
FROM A
WHERE NOT EXISTS (SELECT 1
FROM B
JOIN C ON C.id = B.c_id
JOIN D ON D.id = C.d_id
WHERE A.b_id = B.id
AND D.Active = 1
GROUP BY B.id
HAVING COUNT(D.id) >= 5)
Edit : I looked into Group by in LINQ but I am not sure how I will have access to B.c_id after the group by and select caluses. How do I join to tables C and D?