4 ms·
Assuming you have a foreign key set up between customers and orders, your 'order' entity will automatically have a 'customer' property so you can avoid the 'joi
by redstripe 14y ago
Assuming you have a foreign key set up between customers and orders, your 'order' entity will automatically have a 'customer' property so you can avoid the 'join' syntax.
If your objective is to find orders that belong to male customers over 30:
filteredCustomers = orders.Where(o => o.IsPending && o.customer.IsMale && o.customer.Age > 30);
Some more about avoiding joins (which makes it easier to use the extension syntax):
http://blogs.teamb.com/craigstuntz/2010/01/13/38525/ http://blogs.teamb.com/craigstuntz/2010/01/13/38525/