Я объясню на примере:
//get an entity
var myEntity context.GetClient(543622);
// imagine this client has already a property myValue=10
// (retrieved from the database)
//set again this value
myEntity.myValue = 10;
// then we get the modified for this entity
ObjectStateEntry ose = null;
_context.ObjectStateManager.TryGetObjectStateEntry(myEntity.EntityKey, out ose);
// the ose.EntityState is modified
// and here count = 1 ??!!...
var count = ose.GetModifiedProperties().Count();
//at last a SaveChanges push a commit to the bdd
// (tracked with SQL Server Profiler).
_context.SaveChanges();
Кажется, что независимо от того, что вы устанавливаете одно и то же значение для свойства объекта, состояние изменяется на измененное, и обновление помещается в БД.Я удивлен таким поведением ...
Sinn '