Sprache

IDbCommandInterceptor.ScalarExecuted Methode

Definition

Wird unmittelbar nach EF-Aufrufen aufgerufen ExecuteScalar().

public virtual object? ScalarExecuted(System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.Diagnostics.CommandExecutedEventData eventData, object? result);
public object ScalarExecuted(System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.Diagnostics.CommandExecutedEventData eventData, object result);
public object? ScalarExecuted(System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.Diagnostics.CommandExecutedEventData eventData, object? result);
abstract member ScalarExecuted : System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.Diagnostics.CommandExecutedEventData * obj -> obj
override this.ScalarExecuted : System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.Diagnostics.CommandExecutedEventData * obj -> obj
abstract member ScalarExecuted : System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.Diagnostics.CommandExecutedEventData * obj -> obj
Public Overridable Function ScalarExecuted (command As DbCommand, eventData As CommandExecutedEventData, result As Object) As Object
Public Function ScalarExecuted (command As DbCommand, eventData As CommandExecutedEventData, result As Object) As Object

Parameter

command
DbCommand

Der Befehl.

eventData
CommandExecutedEventData

Kontextbezogene Informationen zum Befehl und zur Ausführung.

result
Object

Das Ergebnis des Aufrufs von ExecuteScalar(). Dieser Wert wird in der Regel als Rückgabewert für die Implementierung dieser Methode verwendet.

Gibt zurück

Das Ergebnis, das EF verwendet. Eine Implementierung dieser Methode für jeden Interceptor, der nicht versucht, das Ergebnis zu ändern, besteht darin, den result übergebenen Wert zurückzugeben.

Hinweise

Diese Methode wird weiterhin aufgerufen, wenn ein Interceptor die Ausführung eines Befehls in ScalarExecuting(DbCommand, CommandEventData, InterceptionResult<Object>)unterdrückt. In diesem Fall result wird das von ScalarExecuting(DbCommand, CommandEventData, InterceptionResult<Object>).

Gilt für: