Hi,
I just updated LLBLGen ...2...it is very cool...We like it a lot
I have a question regarding the template studio versus custom code into templates.
I changed the Entity.Template to support Audit Trail. I have put some code in the save method like you can see here:
public override bool Save(IPredicate updateRestriction, bool recurse)
{
bool transactionStartedInThisScope = false;
Transaction transactionManager = null;
// **************************
// CUSTOM AUDIT LOG AUTOMATION
// Update audit...
try
{
this.AuditConcurrencyDate = DateTime.Now; // Get the current date
this.AuditUserID = int.Parse(System.Threading.Thread.CurrentPrincipal.Identity.Name); // Get the current UserID
}
catch{}
// **************************
if(recurse)
{
if(!base.ParticipatesInTransaction)
{
// Start local transaction
transactionManager = new Transaction(IsolationLevel.ReadCommitted, "SaveRecursively");
// Add ourselves
transactionManager.Add(this);
transactionStartedInThisScope=true;
}
}
try
....
...
when I upgrade LLBLGen Pro I have to put back my code again.
This can be a pain if there was a lot of modifications done in the templates.
Is there a way to keep my custom code in the template?
tx