Share via


IgnoringIdentityResolutionInterceptor.UpdateTrackedInstance Method

Definition

Called when a DbContext attempts to track a new instance of an entity with the same primary key value as an already tracked instance. This implementation does nothing, such that property values from the existing tracked instance are retained.

public virtual void UpdateTrackedInstance (Microsoft.EntityFrameworkCore.Diagnostics.IdentityResolutionInterceptionData interceptionData, Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry existingEntry, object newEntity);
abstract member UpdateTrackedInstance : Microsoft.EntityFrameworkCore.Diagnostics.IdentityResolutionInterceptionData * Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry * obj -> unit
override this.UpdateTrackedInstance : Microsoft.EntityFrameworkCore.Diagnostics.IdentityResolutionInterceptionData * Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry * obj -> unit
Public Overridable Sub UpdateTrackedInstance (interceptionData As IdentityResolutionInterceptionData, existingEntry As EntityEntry, newEntity As Object)

Parameters

interceptionData
IdentityResolutionInterceptionData

Contextual information about the identity resolution.

existingEntry
EntityEntry

The entry for the existing tracked entity instance.

newEntity
Object

The new entity instance, which will be discarded after this call.

Implements

Applies to