Learn how to a build a cloud-first strategyRegister Now


Audit trail in Repository pattern and unit of work

Posted on 2012-08-23
Medium Priority
Last Modified: 2012-09-10
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.

Question by:dumpalpr
1 Comment
LVL 23

Accepted Solution

Michael Fowler earned 1000 total points
ID: 38327993
You could write message to a text file for use as your audit trail using a static class like is suggested here


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


Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question