Hi,
Does anyone know if its possible to create a new property on an existing Entity Type which is based on 2 other properties concatenated together?
E.g. My Person Entity Type has these fields "ID", "Forename", "Surname", "DOB"
I want to create a new field called "Fullname" which is
Forenames + " " + Surname
So i end up with "ID", "Forename", "Surname", "DOB", "Fullname".
I know i can do this using Linq programmatically i.e.
var results = from p in db.People
select new {
ID = p.ID,
Forename = p.Forename,
Surname = p.Surname,
DOB = p.DOB,
Fullname = p.Forename+ " " + p.Surname
};
Then calling something like
var resultsAfterConcat = from q in results
where q.Fullname.Contains(value)
select q;
However i'd really like to use Linq to Entities to do this work for me at the Conceptual Model level.