visual studio lightswitch - Implementing audit trail using multiple tables -
In my previous applications, I successfully installed an audit trail using the approach. His attitude worked perfectly and it was very easy to follow. However, he is using only one table to store the audited record. I need to do something, except that I have an audit table for each table that will audit which is approximately 7-8 tables, if I can find out the passage of normal table objects, then I could possibly have the solutions of Paul Van Bludal I can reconstruct Is there any other example that is possible online? Or any suggestions on how to properly implement audit tracing for more than one table.
ps I tried to use the example but it seems that it was not used in VS 2012 LightSite because it does not work box?
Your question is incredibly broad, possibly very broad, from what I am collecting though There are several tables, which are more likely to be with different columns
What you can do and what to do:
- Write to those people < / Li>
- Determine the content needed for auditing.
- Compare those tables to each other.
It often helps me in determining which degree should be the essence of the material, this particular example inversion of control or dependency injection Can benefit from In this way you can inject specific classes to specific audit.
Public Interface IAudit & lt; T & gt; {Zero Write PioEdit (& lt; T & gt; Model); }
then implement this particular interface one generic , which should represent your audit data model.
Now you have to write your implementation sections which are the heirs of the interface.
Public class inventory: IAudit & lt; Inventory Modell & gt; {Public Zero WriteToAudit (Inventory Model Model) {// Write the content of your database, then pass * properties * to the model // which will write for this particular table}}
Now this Powerful part of the approach:
Content of the public category {Private Iad Audit; Public Zero DoSomething (model) {audit.WriteToAudit (model); }}
So you can now essentially create a new IAudit
, then you can pass in several ways:
- Constructor
- Method
This is an incredibly rough implementation and I can have many typo. It was a quick post, but hopefully it tells you in the right direction. More information can be found on this matter.
Comments
Post a Comment