Audit trail in Repository pattern and unit of work

Posted on 2012-08-23
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

    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

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
    How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

    734 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

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now