IRelationalCommandDiagnosticsLogger.CommandInitialized 方法

定义

CommandInitialized事件的日志。

public System.Data.Common.DbCommand CommandInitialized (Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod commandMethod, Microsoft.EntityFrameworkCore.DbContext? context, Guid commandId, Guid connectionId, DateTimeOffset startTime, TimeSpan duration, Microsoft.EntityFrameworkCore.Diagnostics.CommandSource commandSource);
abstract member CommandInitialized : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod * Microsoft.EntityFrameworkCore.DbContext * Guid * Guid * DateTimeOffset * TimeSpan * Microsoft.EntityFrameworkCore.Diagnostics.CommandSource -> System.Data.Common.DbCommand
Public Function CommandInitialized (connection As IRelationalConnection, command As DbCommand, commandMethod As DbCommandMethod, context As DbContext, commandId As Guid, connectionId As Guid, startTime As DateTimeOffset, duration As TimeSpan, commandSource As CommandSource) As DbCommand

参数

connection
IRelationalConnection

连接。

command
DbCommand

数据库命令对象。

commandMethod
DbCommandMethod

将在此命令上调用的方法的类型。

context
DbContext

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

commandId
Guid

与给定 DbCommand关联的关联 ID。

connectionId
Guid

与正在使用的 DbConnection 关联的关联 ID。

startTime
DateTimeOffset

执行开始的时间。

duration
TimeSpan

命令创建的持续时间。

commandSource
CommandSource

命令的源。

返回

截获的结果。

适用于