BSAPD wrote:
I have not found a good way to do this. I want to take two columns and put them together like: PersonEntity.FirstName + ", " + PersonEntity.LastName. I want to be able to bind on this new column. I found a couple of old posts about this but I am wondering if there is a better solution now.
Please Help!
BTW: I am using the Adapter model.
2 solutions:
A)
- use an custom template set config file (make a copy of the CSharpTemplateSet.config file and change the <name>tag contents) and bind Custom_EntityAdapterTemplate to a new template file, for example myEntityProperties.template
- in myEntityProperties.template, add a TDL statement:
<[If StringValueEquals CurrentEntityName "Person"]>
public string FullName
{
get { return this.Firstname + ", " + this.LastName; }
}
<[EndIf]>
- generate the code using this new template set config file.
or:
B)
- download the extended adapter entity template set from the 3rd party section and generate code with that template set
- in the derived entity class from PersonEntity, add the property
In both cases, you will be able to bind to the column, as it is a normal property.