语言

IRelationalCommandDiagnosticsLogger.CommandNonQueryExecutingAsync 方法

定义

重载

CommandNonQueryExecutingAsync(IRelationalConnection, DbCommand, DbContext, Guid, Guid, DateTimeOffset, CommandSource, CancellationToken)

Source:
IRelationalCommandDiagnosticsLogger.cs
Source:
IRelationalCommandDiagnosticsLogger.cs
Source:
IRelationalCommandDiagnosticsLogger.cs
Source:
IRelationalCommandDiagnosticsLogger.cs

事件的 CommandExecuting 日志。

public System.Threading.Tasks.ValueTask<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<int>> CommandNonQueryExecutingAsync(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 CommandNonQueryExecutingAsync : 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<int>>
Public Function CommandNonQueryExecutingAsync (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 Integer))

参数

connection
IRelationalConnection

连接。

command
DbCommand

数据库命令对象。

context
DbContext

DbContext当前使用的,如果未知,则为 null。

commandId
Guid

与给定 DbCommand关联的关联 ID。

connectionId
Guid

与 DbConnection 所使用的关联 ID 相关联。

startTime
DateTimeOffset

执行开始的时间。

commandSource
CommandSource

命令的源。

cancellationToken
CancellationToken

等待任务完成时观察的 A CancellationToken 。

返回

截获的结果。

例外

如果取消了该操作 CancellationToken 。

适用于

CommandNonQueryExecutingAsync(IRelationalConnection, DbCommand, String, DbContext, Guid, Guid, DateTimeOffset, CommandSource, CancellationToken)

Source:
IRelationalCommandDiagnosticsLogger.cs
Source:
IRelationalCommandDiagnosticsLogger.cs

事件的 CommandExecuting 日志。

public System.Threading.Tasks.ValueTask<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<int>> CommandNonQueryExecutingAsync(Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.Common.DbCommand command, string logCommandText, Microsoft.EntityFrameworkCore.DbContext? context, Guid commandId, Guid connectionId, DateTimeOffset startTime, Microsoft.EntityFrameworkCore.Diagnostics.CommandSource commandSource, System.Threading.CancellationToken cancellationToken = default);
abstract member CommandNonQueryExecutingAsync : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Data.Common.DbCommand * string * Microsoft.EntityFrameworkCore.DbContext * Guid * Guid * DateTimeOffset * Microsoft.EntityFrameworkCore.Diagnostics.CommandSource * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<int>>
Public Function CommandNonQueryExecutingAsync (connection As IRelationalConnection, command As DbCommand, logCommandText As String, 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 Integer))

参数

connection
IRelationalConnection

连接。

command
DbCommand

数据库命令对象。

logCommandText
String

可以记录的命令文本。

context
DbContext

DbContext当前使用的,如果未知,则为 null。

commandId
Guid

与给定 DbCommand关联的关联 ID。

connectionId
Guid

与 DbConnection 所使用的关联 ID 相关联。

startTime
DateTimeOffset

执行开始的时间。

commandSource
CommandSource

命令的源。

cancellationToken
CancellationToken

等待任务完成时观察的 A CancellationToken 。

返回

截获的结果。

例外

如果取消了该操作 CancellationToken 。

适用于