Share via


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.

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

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

Remarks

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

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

Applies to