Audit logging is an important issue while building enterprise systems. Simplest form of audit logging is recording
who and when created/updated an object, or a record in the database respectively. We perform four basic operations
on a domain object. These are
Load
Update
Save
Delete
Data access layer is a good place to perform automated audit logging
whenever one of the operations above is executed. NHibernate provides us with
IInterceptor interface plus ILifecylce interface. You can read this article for more
information about Nhibernate entity lifecyle management.
In this article we will try to perform simple logging that meets the
following minimal requirements
1- We will log who performed insert/update and when this operation was performed
2- Log data will be written to the same database and table as our domain object
More...
f6d7c6de-8fa6-4e9c-b534-6c2956c5f54b|0|.0