Does anyone know if it is possible to create a new property for an existing Entity type that is based on two other properties combined together?
eg. My Person Entity Type has the following fields: "ID", "Forename", "Surname", "DOB"
I want to create a new field called "Full Name", which
Forenames + " " + Surname
So, I have "ID", "Forename", "Surname", "DOB", "Fullname".
I know I can do this with Linq programmatically.
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 call something like
var resultsAfterConcat = from q in results where q.Fullname.Contains(value) select q;
However, I would really like to use Linq for Entities to do this work for me at the conceptual model level.
Crafttyfella
source share