ISaveChangesInterceptor.ThrowingConcurrencyException Method

Definition

Called immediately before EF is going to throw a DbUpdateConcurrencyException.

C#
public virtual Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult ThrowingConcurrencyException (Microsoft.EntityFrameworkCore.Diagnostics.ConcurrencyExceptionEventData eventData, Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult result);

Parameters

eventData
ConcurrencyExceptionEventData

Contextual information about the concurrency conflict.

result
InterceptionResult

Represents the current result if one exists. This value will have IsSuppressed set to true if some previous interceptor suppressed execution by calling Suppress(). This value is typically used as the return value for the implementation of this method.

Returns

If IsSuppressed is false, then EF will throw the exception. If IsSuppressed is true, then EF will not throw the exception. An implementation of this method for any interceptor that is not attempting to suppress setting property values must return the result value passed in.

Applies to

Product Versions
Entity Framework Core 7.0, 8.0, 9.0