see attachment for description.<br />the result should map for GetAllPersonsOfTypeAndIncludeAddressWithZipCodeAs98001<br />this SP is essentially a workaround to beat what EF cannot do:<br />db.Persons.Include(a=>a.Addresses.Any(x=>x.ZipCode=98001)).Where(a=>a.CustomerType=5)<br />but, EF cannot map a SP output to an entity graph, i.e. Parent and add Child Collections when included.
Comments: Consider for future. There is an issue open already open to support includes with filters: http://entityframework.codeplex.com/workitem/47
Comments: Consider for future. There is an issue open already open to support includes with filters: http://entityframework.codeplex.com/workitem/47