Question

I have just recently begun writing an application in ASP.NET MVC4.

My application has objects/models relating with each other in the entire application.

I want to add a cool new feature change tracking / event logging to this application, kinda like facebook notifications.

Basically, I know I need to build an audit log of events taking place in the application, but what is a high-level way to implement this ?

Do I just insert manually into my Audit table after every database operation, or is there a more graceful way to do this ?

Was it helpful?

Solution

A more graceful way would be to subscribe to the SavingChanges event.

Read Basic Auditing for Dynamic Data with Entity Framework 4.x for a nice introductory run through.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top