Hi
I have Person enity which has a 1 : N relationship with Person_Addresses (fields: PersonID, AddressID, ValidFrom). I want to get all Person records and associated Person_Addresses with only latest ValidFrom. How should i do this using ObjectQuery or IQueryable?
Edit: I mentioned ObjectQuery and IQueryable because i wanted to have a solution using extension methods (i think, that how it's called). Also i forgot to mention that i'm using EF where i have the entities generated. I want to get a person object which has it's person_adress member eagerly loaded.
Here are the entities structure: Person members: int id, string firstname, string lastname, Partner_Address partneradress
Person_Address members: int personid, int adressid, date validfrom