Audit trail in Repository pattern and unit of work

Hi Every one,

I am developing an application with entity framework as by DB access layer.

I am using Repository pattern and Unit of work and DBContext  ...

I wanted to implement audit trail while saving changes.. like i have want to update Created Date and User Created / Updated Date and User updated tables while  inserting updating data

can some one please suggest me logic for this.

Thanks
dumpalprAsked:
Who is Participating?
 
Michael FowlerConnect With a Mentor Solutions ConsultantCommented:
You could write message to a text file for use as your audit trail using a static class like is suggested here

http://www.daveoncsharp.com/2009/09/create-a-logger-using-the-trace-listener-in-csharp/

Then can you write messages easily outlining values before and after changes

Michael
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.