All properties of the entity is shown in modifiedproperties method even if one property is changed

Jul 8, 2010 at 12:57 PM
hello, i'm using EF4 in my project. Here the problem am facing is auditing. here is the sample public virtual Patient Update(Patient patient) { using (var ctx = new Entities()) { ctx.Patients.ApplyChanges(patient); var stateEntry = ctx.ObjectStateManager.GetObjectStateEntry(patient); var modifiedProperties= stateEntry.GetModifiedProperties() ctx.SaveChanges(); return patient; } } here even if i modify single property. it shows me all the properties in the modified property List. Please let me know where am going wrong. regards, sumeeth