Share via


DbPropertyEntry.IsModified Property

Definition

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

public bool IsModified { get; set; }
member this.IsModified : bool with get, set
Public Property IsModified As Boolean

Property Value

true if this instance is modified; otherwise, false .

Remarks

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.

Applies to