How to update ALL the dirty entities from the data store, and reset their changed values to the original store value?
The method ObjectContext.Refresh requires as a parameter the entities to be refreshed.
The following usually works:
Context.Refresh(RefreshMode.StoreWins, _ Context.ObjectStateManager.GetObjectStateEntries())
It sometimes causes problems with EntityRelations. look at my comment for further details.
1.4m articles
1.4m replys
5 comments
57.0k users