For my ASP.NET application, I need to get the userid/username, domainid/domainname(id of a company a user is in--a company shares common data they enter) and include each of these two as columns in an audit trail database table record.
I've found a post of how to access the ASP.NET session value (that contains the userid) on the llblgen forums, and that works well.
From a user id, (using llblgen entity fetching code), I can fetch the user name, domain id, domain name.
If I use the dependency-injection, I can put to put the code for auditing into a separate .dll from the llblgen "DatabaseGeneric" code (no compile time circular reference of the auditing code calling the DatabaseGeneric code...because injecting run-time).
However, if I don't use dependency injection, it appears that I need to put the auditing code into the DatabaseGeneric dll. Does this sound accurate?
A second related question: What I'm trying to accomplish is allowing users to select which entities to audit (based on a run-time UI for each user). So, I'm trying to figure out if I can use the dependency-injection way...as each user of the ASP.NET application might be auditing a different set (of the maximum set I allow) of entities. Would you suggest I create auditing for the "maximum" set, then in each auditor, to check if the user has requested the auditing of that entity?
Thanks