Share via


SaveChangesInterceptor.ThrowingConcurrencyException Method

Definition

Called immediately before EF is going to throw a DbUpdateConcurrencyException.

public virtual Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult ThrowingConcurrencyException (Microsoft.EntityFrameworkCore.Diagnostics.ConcurrencyExceptionEventData eventData, Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult result);
abstract member ThrowingConcurrencyException : Microsoft.EntityFrameworkCore.Diagnostics.ConcurrencyExceptionEventData * Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult -> Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult
override this.ThrowingConcurrencyException : Microsoft.EntityFrameworkCore.Diagnostics.ConcurrencyExceptionEventData * Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult -> Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult
Public Overridable Function ThrowingConcurrencyException (eventData As ConcurrencyExceptionEventData, result As InterceptionResult) As InterceptionResult

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.

Implements

Applies to