I am utilizing Entity Framework 4.0 and WCF. I am new to using Entity Framework and am more familiar with NHibernate. However, I am concerned about detached instances of objects when performing an update.
I have looked on various websites where they retrieve an object, attach the instance to their context, and set all properties to be modified but this leaves two problems:
Is there a 'best practice' example of how to handle updating detached entity instances? Any guidance is greatly appreciated.
Brandon, are you able to make use of the self-tracking entities template? This is designed to make handling updates of detached entities much easier. http://msdn.microsoft.com/en-us/library/ee789839.aspx
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.