I am rusty on this, I haven't used since 2010.
DBML
>DBML
>LINQ conditional
Check this out:
var q = from co in Counties
where co.Cities.Any(city =>city.Population > p)
select co;
Can be written simply:
var q = Counties.Where(co => co.Cities.Any(city => city.Population > p));
No comments:
Post a Comment