With EF4 CTP5 DbContext, what is the equivalent of this
public void Refresh(Document instance)
{
_ctx.Refresh(RefreshMode.StoreWins, instance);
}
I've tried this but it doesn't do the same thing, updating the instance
public void Refresh(Document instance)
{
_ctx.ChangeTracker.DetectChanges();
}
?
You must use this:
public void Refresh(Document instance)
{
_ctx.Entry<Document>(instance).Reload();
}