Tuesday, 15 May 2012

c# - Insert\Update - object values history maintenance in ObjectContext -



c# - Insert\Update - object values history maintenance in ObjectContext -

i have windows service processes input xml files. need insert new records , update existing records every time new file. need implement insert\update history every time after operation has occurred. required maintain in separate table displaying old value , new value. there existing methodologies or techniques available implementing in easier way i.e comparing 2 objects , identifying modified fields. please provide suggestions. using entityframework 5.0 , sql 2012.

there multiple ways this.

using interceptors of persistence api framework. eg jpa or hibernate framework provides facade around entity operations runs after dml operations in database.

event listeners: should able create event listeners within persistence framework triggered , insert history info in history tables after each dml operation.

database triggers: indeed 1 of simplest way of maintaining history info given row/table.

hope these pointers help anant

c# sql entity-framework audit

No comments:

Post a Comment