Auditing is another common security-related task. An audit log is an append-only record of changes in a system that allows you to trace a particular action back to its source. In this recipe, I'll show you how we can easily create an audit log to track changes to our entities.
Eg.Coremodel from Chapter 1, along with
App.configwith a standard NHibernate and log4net configuration.
sessionfactoryelement, add the following three event elements:
<event type="pre-insert"> <listener class="AuditEventListener.EventListener, AuditEventListener" /> </event> ...