4 ms·
I've used two from's for inner joins: var filteredCustomers = from c in customers from o in orders where o.customerid = c.customerid &
by libria 14y ago
I've used two from's for inner joins:
var filteredCustomers =
from c in customers
from o in orders
where o.customerid = c.customerid &&
c.IsMale && c.Age > 30 &&
o.IsPending
select new {Customer = c, Order = o};
This is one of those cases where I'll favor query syntax over extensions. OTOH, query syntax requires an explicit `select` where it's often optional in extensions. Also, `.ToList()` doesn't have a query syntax counterpart so you'll often mix both if you tend to favor query.