Hi
I'm using SelfServicing general, and I'd like to add some bussiness logic to the Entities generated, like everytime the entity is saved automatically set the lastupdate field of the entity with the current date or if saving an entity without Guid then automatically set the field, all this should be done before persiting the entity.
Its there any Custom Template designed for this matter where I should put this logic?, or should I overrride the original Template for Selfservicing, if so, in which method should I add this logic...
The TDL sintax will be something like this:
<[Foreach EntityField ]>
<[If StringValueEquals EntityFieldName "LastUpdate"]>
this.LastUpdate = DataTime.Now;
<[EndIf]>
<[NextForeach]>
<[Foreach EntityField ]>
<[If StringValueEquals EntityFieldName "Guid"]>
if (this.Guid == String.Empty)
{
this.Guid = "abcsaddddssddetc...";
}
<[EndIf]>
<[NextForeach]>
Please advice what it is in your opinion the best way to implement this?
PS> I can't use SPs on my DB...
Many Thanks
Jaume