I want to compose the results of two Linq Expressions. The result I would like composed would be the composition of both return objects.
Expression<Func<Person, User>> basicUser = t => new User() { Name = t.FirstName };
Expression<Func<Person, User>> detailedUser = t => Execute basicUser and add the following assignments { DOB = t.DOB };
WHERE detailedUser inherits so to speak all of the logic in basicUser and sets the DOB property of the User object.
This would be used like so:
context.CreateObjectSet<Persons>().Where(p => p.PersonType == User).Select<Person, User>(detailedUser);
Any help would be greatly appreciated.