entity framework 4 - How does EF4 determines if a property has really changed? -


i need way track modified properties , audit them. hooking savechanges modified properties

   //get modified customer entries    var modifiedcustomeroses = context.objectstatemanager      .getobjectstateentries<customer>(entitystate.modified)      .tolist(); 

what have noticed , using ef4 codegeneration reports when property not modified modified. if property eg "customername" set "john" , when update dont change name entitycustomer.name=customerdto.name , name same still reports changed.

i have looked @ generated code , cannot see if ef property check like

if(name==value)//propertynotchanged dont raiseevent.

any suggestions? know how ef4 determines if property has changed?

thanks

the tracking performed on entity level, not on property level.
more appropriate way trace if property changed use onpropertychanged partial method.
create custom code hold changed properties.


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -