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(); }
1.4m articles
1.4m replys
5 comments
57.0k users