Share via


ChangeTracker.DetectingEntityChanges Event

Definition

An event fired when detecting changes to a single entity is about to happen, either through an explicit call to DetectChanges() or DetectChanges(), or automatically, such as part of executing SaveChanges() or SaveChangesAsync(CancellationToken).

public event EventHandler<Microsoft.EntityFrameworkCore.ChangeTracking.DetectEntityChangesEventArgs> DetectingEntityChanges;
member this.DetectingEntityChanges : EventHandler<Microsoft.EntityFrameworkCore.ChangeTracking.DetectEntityChangesEventArgs> 
Public Custom Event DetectingEntityChanges As EventHandler(Of DetectEntityChangesEventArgs) 

Event Type

Remarks

AutoDetectChangesEnabled is set to false for the duration of the event to prevent an infinite loop of recursive automatic calls.

See EF Core change tracking for more information and examples.

Applies to