Table of Contents

Class IgnoringIdentityResolutionInterceptor

Namespace
Microsoft.EntityFrameworkCore.Diagnostics
Assembly
Microsoft.EntityFrameworkCore.dll

A IIdentityResolutionInterceptor that ignores the new instance and retains property values from the existing tracked instance.

public class IgnoringIdentityResolutionInterceptor : IIdentityResolutionInterceptor, IInterceptor
Inheritance
IgnoringIdentityResolutionInterceptor
Implements
Inherited Members

Constructors

IgnoringIdentityResolutionInterceptor()

public IgnoringIdentityResolutionInterceptor()

Methods

UpdateTrackedInstance(IdentityResolutionInterceptionData, EntityEntry, object)

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(IdentityResolutionInterceptionData interceptionData, EntityEntry existingEntry, object newEntity)

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.