IRelationalCommandDiagnosticsLogger.CommandCreating 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
CommandCreating事件的日志。
public Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<System.Data.Common.DbCommand> CommandCreating (Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod commandMethod, Microsoft.EntityFrameworkCore.DbContext? context, Guid commandId, Guid connectionId, DateTimeOffset startTime, Microsoft.EntityFrameworkCore.Diagnostics.CommandSource commandSource);
abstract member CommandCreating : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod * Microsoft.EntityFrameworkCore.DbContext * Guid * Guid * DateTimeOffset * Microsoft.EntityFrameworkCore.Diagnostics.CommandSource -> Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<System.Data.Common.DbCommand>
Public Function CommandCreating (connection As IRelationalConnection, commandMethod As DbCommandMethod, context As DbContext, commandId As Guid, connectionId As Guid, startTime As DateTimeOffset, commandSource As CommandSource) As InterceptionResult(Of DbCommand)
参数
- connection
- IRelationalConnection
连接。
- commandMethod
- DbCommandMethod
将在此命令上调用的方法的类型。
- connectionId
- Guid
与正在使用的 DbConnection 关联的关联 ID。
- startTime
- DateTimeOffset
执行开始的时间。
- commandSource
- CommandSource
命令的源。
返回
截获的结果。