Compartir a través de


RelationalLoggerExtensions.CommandScalarExecutingAsync Método

Definición

Registros del CommandExecuting evento.

public static System.Threading.Tasks.Task<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<object>> CommandScalarExecutingAsync (this Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Command> diagnostics, Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.DbContext context, Guid commandId, Guid connectionId, DateTimeOffset startTime, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.ValueTask<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<object>> CommandScalarExecutingAsync (this Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Command> diagnostics, Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.DbContext context, Guid commandId, Guid connectionId, DateTimeOffset startTime, System.Threading.CancellationToken cancellationToken = default);
static member CommandScalarExecutingAsync : Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Command> * Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.DbContext * Guid * Guid * DateTimeOffset * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<obj>>
static member CommandScalarExecutingAsync : Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Command> * Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.DbContext * Guid * Guid * DateTimeOffset * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<obj>>
<Extension()>
Public Function CommandScalarExecutingAsync (diagnostics As IDiagnosticsLogger(Of DbLoggerCategory.Database.Command), connection As IRelationalConnection, command As DbCommand, context As DbContext, commandId As Guid, connectionId As Guid, startTime As DateTimeOffset, Optional cancellationToken As CancellationToken = Nothing) As Task(Of InterceptionResult(Of Object))
<Extension()>
Public Function CommandScalarExecutingAsync (diagnostics As IDiagnosticsLogger(Of DbLoggerCategory.Database.Command), connection As IRelationalConnection, command As DbCommand, context As DbContext, commandId As Guid, connectionId As Guid, startTime As DateTimeOffset, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of InterceptionResult(Of Object))

Parámetros

diagnostics
IDiagnosticsLogger<DbLoggerCategory.Database.Command>

Registrador de diagnóstico que se va a usar.

connection
IRelationalConnection

La conexión.

command
DbCommand

Objeto de comando de base de datos.

context
DbContext

Que DbContext se usa 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 objeto DbConnection que se está usando.

startTime
DateTimeOffset

Hora en que comenzó la ejecución.

cancellationToken
CancellationToken

Token de cancelación.

Devoluciones

Resultado interceptado.

Se aplica a