Let's say I have class PersonSummary, which combines properties (columns) from 2 database tables Person and Address (with a foreign key of Person), so a PersonSummary has a First Name, State and Zip.
The creation of PersonSummary could be in a select clause with (person, address => new PersonSummary {person, address} )
My data access layer has no knowledge of PersonSummary, so I'd like to add the select clause at a higher level, and only construct the from, where, etc. at a lower level, to select rows from Person and Address based on different criteria, for e.g. have methods like GetFemales() or GetPeopleInAState().
Any recommendations on how to do this? Should my data-access functions return Expressions and the higher level method just tacks on a Select clause to it?
Signatures/Return types most appreciated.