by Marius Gheorghe
15. September 2009 09:51
Here's the description for entityCollection.Load(MergeOption.OverwriteChanges);
"Objects are always loaded from the persisted store. Any property changes made to
objects in the object context are overwritten by the store values."
Wrong.
If you add an item to the entity collection and then call Load(MergeOption.OverwriteChnages), you will STILL find that item there. To get data from database, you'll need to do :
entityCollection.Clear();
entityCollection.Load(MergeOption.OverwriteChanges);