This project is read-only.

Project Description

AuditDbContext provides entity change auditing for Entity Framework POCO entities.



AuditDbContext lets you easily implement change auditing on your application entities.  Instead of using Entity Frameworks DbContext you derive your context from AuditDbContext, which will automatically write change audit records to the database for the registered audit types whenever SaveChanges is called.

An audit record is written whenever an update of delete operation is applied to an entity and stores the time of the change and the user making the change along with the original entity values. 

You end up with a complete audit trail changes to your entity. Future releases will provide methods to check the audit trail is complete and highlight any inconsistencies in the audit trail.



Just a few simple step to implement:

  • Implement IAuditableEntity on your entity, or use the AuditableEntity base class.
  • Define an audit history entity implementing IAuditEntity, or use the AuditEntry base class.
  • Derive you context from AuditDbContext.
  • Register the audit types either through app.config, or through code using the RegisterAuditType method.

More details can be found here.

Last edited Mar 30, 2012 at 7:44 AM by russ256, version 6