- I first wrote this which was pretty sound.
- .Any would not work with a comparison against a collection however so I wrote this which was flawed.
- I followed up with this correction, and in doing so I wondered what the appropriate use of .Select would be.
- It isn't too shabby for reaching two levels down a hierarchy. Behold:
return new AdHocSpecification<Foo>(f => f.Bars.Select(br => br.Bazes).Where(bz => bz.Where(baz => baz.Qux == true).Count() > 0).Count() > 0);
Saturday, November 5, 2011
a better posting on selecting from collections within collections by way of Lambdas!
I've tried to write a few quick blog postings on selecting from collections within collections by way of a Lambda and as I have done so I have made some mistakes as I myself am learning. In summary:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment