How to write this LINQ expression in another .SelectMany() form ?
var result =
from a in numbersA
where a < 3
from b in numbersB
where b < 5
select new { a, b };
?
var result = numbersA.Where(x => x < 3).Select.. ?
This is a rough translation of what the compiler would do:
Now you can write this more efficiently as:
… but that’s not what the compiler would do. It’s not clear whether your aim is to see what the compiler does, or to just write a query.