DbPropertyEntry.IsModified Property

 

Gets or sets a value indicating whether the value of this property has been modified since it was loaded from the database.

Namespace:   System.Data.Entity.Infrastructure
Assembly:  EntityFramework (in EntityFramework.dll)

public bool IsModified { get; set; }

Property Value

Type: System.Boolean

true if this instance is modified; otherwise, false .

Setting this value to false for a modified property will revert the change by setting the current value to the original value. If the result is that no properties of the entity are marked as modified, then the entity will be marked as Unchanged. Setting this value to false for properties of Added, Unchanged, or Deleted entities is a no-op.