I\'m looking for ideas on how to implement audit trails for my objects in C#, for the current project,basically I need to:
1.Store the old values and new values of a
In addition to some of the things mentioned in the above thread the Command Pattern might be of help, if you wrap all the state changes on your object in a command then the command can be responsible for keeping the audit trail, while the object does not have to worry about auditing itself. Of course there is added overhead to creating and disposing commands.
You can wrap commands around any existing object structure, you just delegate your actions to the command layer as opposed to doing them on the objects directly.