Delen via


EntityEntry.OriginalValues Property

Definition

Gets the original property values for this entity. The original values are the property values as they were when the entity was retrieved from the database.

public virtual Microsoft.EntityFrameworkCore.ChangeTracking.PropertyValues OriginalValues { get; }
public virtual Microsoft.EntityFrameworkCore.ChangeTracking.PropertyValues OriginalValues { [System.Diagnostics.DebuggerStepThrough] get; }
member this.OriginalValues : Microsoft.EntityFrameworkCore.ChangeTracking.PropertyValues
[<get: System.Diagnostics.DebuggerStepThrough>]
member this.OriginalValues : Microsoft.EntityFrameworkCore.ChangeTracking.PropertyValues
Public Overridable ReadOnly Property OriginalValues As PropertyValues

Property Value

The original values.

Attributes

Remarks

Note that whenever real original property values are not available (e.g. entity was not yet persisted to the database or was retrieved in a non-tracking query) this will default to the current property values of this entity.

See Accessing tracked entities in EF Core for more information and examples.

Applies to