Entity Framework DbContext SaveChanges() OriginalValue Incorrect

前端 未结 5 978
孤街浪徒
孤街浪徒 2020-12-03 21:51

I am trying to implement an AuditLog using EF 4.1, by overriding the SaveChanges() method as discussed in the following places:

  • http://jmdority.wordpress.com/2
5条回答
  •  温柔的废话
    2020-12-03 22:41

    You can get data that you haven't committed yet.

    var Current = _dbContext.Entry(entity).GetDatabaseValues().ToObject();
    

提交回复
热议问题