Compartir a través de


IDbCommandInterceptor.ScalarExecuted Método

Definición

Se llama inmediatamente después de llamar a EF.ExecuteScalar()

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);
public virtual 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
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
Public Function ScalarExecuted (command As DbCommand, eventData As CommandExecutedEventData, result As Object) As Object
Public Overridable Function ScalarExecuted (command As DbCommand, eventData As CommandExecutedEventData, result As Object) As Object

Parámetros

command
DbCommand

El comando.

eventData
CommandExecutedEventData

Información contextual sobre el comando y la ejecución.

result
Object

Resultado de la llamada a ExecuteScalar(). Este valor se usa normalmente como valor devuelto para la implementación de este método.

Devoluciones

Resultado que EF usará. Una implementación de este método para cualquier interceptor que no intente cambiar el resultado es devolver el result valor pasado.

Comentarios

Se sigue llamando a este método si un interceptor suprimió la ejecución de un comando en ScalarExecuting(DbCommand, CommandEventData, InterceptionResult<Object>). En este caso, result es el resultado devuelto por ScalarExecuting(DbCommand, CommandEventData, InterceptionResult<Object>).

Se aplica a