Combine first middel last name

Posts   
 
    
neutcomp
User
Posts: 8
Joined: 16-Nov-2006
# Posted on: 01-Nov-2007 21:47:14   

I have a question.

If I have the tabel: Persons Id FirstName MiddleName LastName

Is there a way to get back PersonEntity oPerson = new PersonEntity(1); oPerson.FullName;

Offcours I can create a query QryPerson like:

SELECT (Persons.FirstName + " " + Person.MiddleName + " " + Person.LastName) as FullName

And then do: QryPersonEntity etc.

But is there an easier way?

Thanks Bjorn

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 02-Nov-2007 10:45:12   

If you want it as a property in your entity. (FullName)

Then you may extend the generated code: Add another partial class file for the Persons Entity class, and include and define a new property FullName with a Getter that appends other properties.