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.
2.1m questions
2.1m answers
60 comments
57.0k users