LLBL Gen Pro 2.6 and audit

I am using LLBL Gen Pro v2.6 and am trying to create a tool for auditing changes made to a database. Now I know LLBL Gen has auditing built into it using AuditorBase and Dependency Injection. I have a question; I need to keep track of not only the material that LLBL Gen provides as auditable, but also the user who made the change. From what I've seen, there is no built-in way to collect this information. Has anyone used LLBL Gen built into auditing and figured out a way to do this?

Wayne E. Pfeffer

0


source to share


3 answers


I have used LLBLGens auditing classes. The user definition is what you will have to handle. There are too many variables for LLBLGen to actually do this for you. How are your users handled? Is this a winforms or asp.net app?

The best solution would be to store the UserId in a session variable or static variable whichever is more appropriate for your application. In your auditing class implementation, you can simply pull the UserId out of your storage location.



Another potential solution would be to override the Entity Class or Data Adapter and pass the UserId to your save methods. However, it will be much more.

+1


source


In my WinForms app, I accomplish this by creating my own IPrincipal and sticking to that in System.Threading.Thread.CurrentPrincipal when the user logs into the app. Then I can easily grab this from my LLBLGen auditing classes.



+1


source


We are also going to audit the db changes and have the same problem with adding user_id to auditlog. I see that you can do a pull-up for example. fetchingn user_id from the web session (we are creating a web app) but that would completely ruin the application splitting as I see it !?

those. if the DAL is pulling data data from the presentation layer (web session), I won't be able to use the DAL in other contexts?

Respectfully,

- thomas

0


source







All Articles