Share via


EntityEntry.Reload Method

Definition

Reloads the entity from the database overwriting any property values with values from the database.

public virtual void Reload ();
abstract member Reload : unit -> unit
override this.Reload : unit -> unit
Public Overridable Sub Reload ()

Remarks

The entity will be in the Unchanged state after calling this method, unless the entity does not exist in the database, in which case the entity will be Detached. Finally, calling Reload on an Added entity that does not exist in the database is a no-op. Note, however, that an Added entity may not yet have had its permanent key value created.

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

Applies to