Audit Options for v1 and Self-Servicing?

Posts   
 
    
jaskey avatar
jaskey
User
Posts: 23
Joined: 09-Jul-2006
# Posted on: 26-Jul-2007 00:38:13   

Hi Everyone...

We have been using LLBL for about a year so far but are still on v1. I need to implement auditing and have read several great posts but they seem to be targeted for Adapter scenario or v2.

Triggers are not an option as I use SQL auth and don't have the user's identity at the trigger level.

From what I can tell, I can modify the EntityBase template possibly but have not seen any detailed discussion on this topic. Has anyone gone down this route? I'm playing with that now but it presents a challenge since the templates would need to be distributed via source control outside our typical workspaces.

Are there realistic options beyond these two (triggers and TemplateMods) for Self-Servicing that I am missing?

thank you for your time

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 27-Jul-2007 10:56:57   

Best place to do so is to override InsertEntity and UpdateEntity in the derived entity class for each entity and do your audit actions there.

V2.5 will have auditing build in so all you do is write an auditor class and you're set.

Frans Bouma | Lead developer LLBLGen Pro
jaskey avatar
jaskey
User
Posts: 23
Joined: 09-Jul-2006
# Posted on: 27-Jul-2007 21:05:42   

I found a post that you made waaaay back in 2004, but this only seems to work for the Self-Servicing Two Class scenario.

http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=959&HighLight=1

I am using Self-Servicing General Scenario so Im thinking that

Custom_EntityUsingEntityBaseTemplate

is the wrong TemplateId to use since it is mentioned for Self Servicing Two Class... I looked through the docs but didn't find much on the different TemplateId's.

Is there a specific TemplateID I need to use for SS General scenario or am I missing the idea completely? smile

thanks

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 30-Jul-2007 18:57:29   

If you use general instead of two classes, you have to add the code to the generated entity classes, which is done either by using partial classes or by using an include template bound to Custom_EntityTemplate

You can also add the code to the user code region at the bottom of the entity classes.

Frans Bouma | Lead developer LLBLGen Pro