<p>I'm looking for ideas on how to implement audit trails for my objects in C#, for the current project,basically I need to:</p>
<ol>
<li>Store the old values and new values of a given object.</li>
<li>Record creation of new objects.</li>
<li>Deletion of old object.</li>
</ol>
<p>Is there any generic way of doing this,like using C# Generics,so that I don't have to write code for events of the base object like on creation,on deletion etc.(ORM objects).The thing is that if there was a way to inject audit trail if one is using a .Anybody have any experiences or any methods they follow.Any way to do this in a Aspect-oriented (AOP) mannner.</p>
<p>Please share your ideas etc.</p>

Question is pretty similar to
How do you implement audit trail for your objects (Programming)?
We've implemented a similar solution, using AOP (aspectJ implementation). Using this particular points can be captured and specific operations can be performed.
This can be plugged in and plugged off when we like.
However, our implementation was in J2EE..
If you really want to do it in the app layer, i would suggest this.
Hope it helps..