Sprache

SaveChangesInterceptor.ThrowingConcurrencyException Methode

Definition

Wird unmittelbar aufgerufen, bevor EF eine 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

Parameter

eventData
ConcurrencyExceptionEventData

Kontextbezogene Informationen zum Parallelitätskonflikt.

result
InterceptionResult

Stellt das aktuelle Ergebnis dar, falls vorhanden. Dieser Wert muss festgelegt true werdenIsSuppressed, wenn ein früherer Interceptor die Ausführung durch Aufrufen Suppress()unterdrückt hat. Dieser Wert wird in der Regel als Rückgabewert für die Implementierung dieser Methode verwendet.

Gibt zurück

Wenn IsSuppressed ja false, löst EF die Ausnahme aus. Wenn IsSuppressed ja 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.

Implementiert

Gilt für: