RelationalLoggerExtensions.CommandCreated 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
CommandCreated事件的日志。
public static System.Data.Common.DbCommand CommandCreated (this Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Command> diagnostics, 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);
static member CommandCreated : Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Command> * Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod * Microsoft.EntityFrameworkCore.DbContext * Guid * Guid * DateTimeOffset * TimeSpan -> System.Data.Common.DbCommand
<Extension()>
Public Function CommandCreated (diagnostics As IDiagnosticsLogger(Of DbLoggerCategory.Database.Command), connection As IRelationalConnection, command As DbCommand, commandMethod As DbCommandMethod, context As DbContext, commandId As Guid, connectionId As Guid, startTime As DateTimeOffset, duration As TimeSpan) As DbCommand
参数
- diagnostics
- IDiagnosticsLogger<DbLoggerCategory.Database.Command>
要使用的诊断记录器。
- connection
- IRelationalConnection
连接。
- command
- DbCommand
数据库命令对象。
- commandMethod
- DbCommandMethod
将在此命令上调用的方法的类型。
- connectionId
- Guid
与正在使用的 DbConnection 关联的关联 ID。
- startTime
- DateTimeOffset
执行开始的时间。
- duration
- TimeSpan
命令创建持续时间。
返回
截获的结果。