Дмитрий
Дмитрий

Reputation: 1

ObjectContext.ObjectStateManager

I am using Entity Framework v5; I am view link http://msdn.microsoft.com/ru-ru/library/system.data.objects.objectcontext.objectstatemanager.aspx But in this code myDbContext.ObjectStateManager.ChangeObjectState(objClass, EntityState.Modified); not have property ObjectStateManager. Where it is property? Or how resolve it problem?

Upvotes: 0

Views: 327

Answers (1)

Ladislav Mrnka
Ladislav Mrnka

Reputation: 364269

DbContext API does this differently:

dbContext.Entry(entity).State = EntityState.Modified;

You must follow documentation for API you are using.

Upvotes: 1

Related Questions