Share via


IIdentityResolutionInterceptor.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 method must apply any property values and relationship changes from the new instance into the existing instance. The new instance is then discarded.

public 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
Public 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.

Applies to