In my model I have Address as a base class and MailingAddress, Email, and Phone as subclasses of Address. A Person has an address so query to get a person who has an Oakland Mailing address would look like this:
var peopleInOakland = from p in entities.DbObjectSet.OfType<Person>()
from a in p.Addresses.OfType<MailingAddress>()
where a.City == "Oakland"
select p;
How do I also include the mailing addresses of the person in my query result? I know I should be using an Include, but I'm unsure of how to name the MailingAddress in the .Include argument.
Thanks in advance