I know
from f in list
where f.bar == someVar
select f
can be written as
list.Where( f => f.bar == someVar );
Can a similar expression be created from
from f in foo
from b in f.bar
where b.something == someVar
select b;
?
I know
from f in list
where f.bar == someVar
select f
can be written as
list.Where( f => f.bar == someVar );
Can a similar expression be created from
from f in foo
from b in f.bar
where b.something == someVar
select b;
?
from
maps (for subsequent terms) to SelectMany
:
var query = foo.SelectMany(f=>f.bar).Where(b=>b.something==someVar);
(note that no final Select
is necessary for trivial projections)