views:

33

answers:

1

Is there any way of tracking EF entities changes between contexts for ASP.NET applications?

Self-Tracking entities doesn't work well for me as it is primarily designed for WCF. And all approaches for tracking changes for POCO I have found are oriented on shared context.

+1  A: 

No you have to track changes by yourselves or you have to use STE and store them in ViewState/Session between postbacks.

Edit: If you work with simple entity you can use some methods to track changes for you but first you have to load the entity from database (= additional database query). Then you can use for example ApplyCurrentValues method of the ObjectContext instance. This appraoch doesn't work for updating object complex graphs.

Ladislav Mrnka