I currently have the following code
What I want to retrieve is the count of all issues within site which are not closed.
The structure is:
site 1-* Blocks 1-* Rooms 1-* Issues
I think what I have at the moment would return the count of blocks which have an open issue. Any ideas if it's possible to do what I want within one expression, I can't get my head around it
Any help much appreciated
Code:
var issues = (from b in site.Blocks where b.Rooms.Any(r => r.Issues.Any(i => !i.Closed))select b).Count();
The structure is:
site 1-* Blocks 1-* Rooms 1-* Issues
I think what I have at the moment would return the count of blocks which have an open issue. Any ideas if it's possible to do what I want within one expression, I can't get my head around it

Any help much appreciated