Compartir a través de


IRelationalCommandDiagnosticsLogger.CommandScalarExecutingAsync Método

Definición

Registra el CommandExecuting evento.

public System.Threading.Tasks.ValueTask<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<object>> CommandScalarExecutingAsync (Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.DbContext? context, Guid commandId, Guid connectionId, DateTimeOffset startTime, Microsoft.EntityFrameworkCore.Diagnostics.CommandSource commandSource, System.Threading.CancellationToken cancellationToken = default);
abstract member CommandScalarExecutingAsync : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.DbContext * Guid * Guid * DateTimeOffset * Microsoft.EntityFrameworkCore.Diagnostics.CommandSource * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<obj>>
Public Function CommandScalarExecutingAsync (connection As IRelationalConnection, command As DbCommand, context As DbContext, commandId As Guid, connectionId As Guid, startTime As DateTimeOffset, commandSource As CommandSource, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of InterceptionResult(Of Object))

Parámetros

connection
IRelationalConnection

La conexión.

command
DbCommand

Objeto de comando de base de datos.

context
DbContext

Objeto DbContext que se está usando actualmente, en null si no se conoce.

commandId
Guid

Identificador de correlación asociado al especificado DbCommand.

connectionId
Guid

Identificador de correlación asociado al DbConnection objeto que se usa.

startTime
DateTimeOffset

Hora en que comenzó la ejecución.

commandSource
CommandSource

Origen del comando.

cancellationToken
CancellationToken

Que CancellationToken se debe observar mientras se espera a que se complete la tarea.

Devoluciones

Resultado interceptado.

Excepciones

Se aplica a