ISaveChangesInterceptor.ThrowingConcurrencyException Methode

Definition

Wird unmittelbar aufgerufen, bevor EF eine DbUpdateConcurrencyExceptionauslöst.

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

Parameter

eventData
ConcurrencyExceptionEventData

Kontextbezogene Informationen zum Parallelitätskonflikt.

result
InterceptionResult

Stellt das aktuelle Ergebnis dar, sofern vorhanden. Dieser Wert wird auf true festgelegt, wenn ein vorheriger Interceptor die Ausführung durch Aufrufen Suppress()von unterdrückt hatIsSuppressed. Dieser Wert wird in der Regel als Rückgabewert für die Implementierung dieser Methode verwendet.

Gibt zurück

Wenn IsSuppressed ist false, löst EF die Ausnahme aus. Wenn IsSuppressed ist true, löst EF die Ausnahme nicht aus. Eine Implementierung dieser Methode für jeden Interceptor, der nicht versucht, das Festlegen von Eigenschaftswerten zu unterdrücken, muss den result übergebenen Wert zurückgeben.

Gilt für: