Altitude News & Blog

Welcome to Altitude Blog where you will, over time, find nuggets of news and useful insights into the world of Software Development, Automation and Business Intelligence.

Entity Framework Audit Fields

Nuno 11 Aug 2014

There are several articles on the internet about the automatic population of database audit fields for user tables. Good examples of such fields are Created By, Created Date, Modified By or Modified Date, although there may be many reasons to audit other value changes. A good solution I have come across is to make the entities we want audited extend an interface, that we might call IAuditable, and override the Entity Framework Save method, setting up the audit fields for the entities that implement that same interface.

Read more