Return to Snippet

Revision: 34747
at October 28, 2010 04:22 by housecor


Updated Code
var universe = from oa in context.vOfficeAddresses where oa.StateProvince == "Ontario" select oa;

var query = from oa in universe 
			select new { 
				oa, 
				contact = (from c in context.Contacts where c.ContactID == oa.ContactID select c) 
			};
var AddressesWithContacts = query.ToList();

Revision: 34746
at October 28, 2010 00:02 by housecor


Initial Code
var universe = from oa in context.vOfficeAddresses where oa.StateProvince == "Ontario" select oa;

var query = from oa in universe
select new
{
oa,
contact = (from c in context.Contacts where c.ContactID == oa.ContactID select c)
};
var AddressesWithContacts = query.ToList();

Initial URL


Initial Description
Note: An order operator in a subquery will be ignored. The main query controls ordering.

Initial Title
Break nested query out of main query in LINQ

Initial Tags


Initial Language
C#