EntityEntry.GetDatabaseValues Method

Definition

Queries the database for copies of the values of the tracked entity as they currently exist in the database. If the entity is not found in the database, then null is returned.

Note that changing the values in the returned dictionary will not update the values in the database.

public virtual Microsoft.EntityFrameworkCore.ChangeTracking.PropertyValues GetDatabaseValues ();
public virtual Microsoft.EntityFrameworkCore.ChangeTracking.PropertyValues? GetDatabaseValues ();
abstract member GetDatabaseValues : unit -> Microsoft.EntityFrameworkCore.ChangeTracking.PropertyValues
override this.GetDatabaseValues : unit -> Microsoft.EntityFrameworkCore.ChangeTracking.PropertyValues
Public Overridable Function GetDatabaseValues () As PropertyValues

Returns

PropertyValues

The store values, or null if the entity does not exist in the database.

Remarks

See Accessing tracked entities in EF Core for more information.

Applies to