title: Entity Framework 4 - How is ObjectContext.Refresh() supposed to work?
body: <p>When I call Refresh using RefreshMode.StoreWins on an entity that is in my context and the values in the database are different than what the entity currently holds, is my entity supposed to update the currentvalues to that of the database even if my objects entitystate is unchanged? </p>
  
  <p>When editing an entity we instantiate a new context and instantiate a new ourClass(classId) which loads the current entity of our class type from the database. Making changes to ourClass and calling SaveChanges correctly saves the values to the database. After returning to the calling viewmodel, we call Refresh on the pre-existing context using RefreshMode.StoreWins but this is not updating the values of the entities in this context despite seeing that the values in the database were correctly updated using SSMS. Any ideas what I should be looking into for solving this issue?</p>
  
  <p><strong>EDIT:</strong>
  Simple example of how we are doing things:</p>
  
  <pre><code>var context1 = new Model1();
  LoadContext(); //loads all the data from the database and adds them to the context
  var context2 = new Model1();
  var SelectedObject = context1.Table1.First();
  OurObject selectedObjectForEdit = new OurObject(SelectedObject.ObjectId);
  context2.Table1.Add(selectedObjectForEdit);
  selectedObjectForEdit.Name = "new name";
  context2.SaveChanges();
  context1.Refresh(RefreshMode.StoreWins, SelectedObject);
  </code></pre>