CommandCorrelatedEventData 构造函数

定义

重载

CommandCorrelatedEventData(EventDefinitionBase, Func<EventDefinitionBase, EventData,String>, DbConnection, DbContext, DbCommandMethod, Guid, Guid, Boolean, DateTimeOffset)
已过时.

构造事件有效负载。

CommandCorrelatedEventData(EventDefinitionBase, Func<EventDefinitionBase, EventData,String>, DbConnection, DbContext, DbCommandMethod, Guid, Guid, Boolean, DateTimeOffset, CommandSource)

构造事件有效负载。

CommandCorrelatedEventData(EventDefinitionBase, Func<EventDefinitionBase, EventData,String>, DbConnection, DbContext, DbCommandMethod, Guid, Guid, Boolean, DateTimeOffset)

Source:
CommandCorrelatedEventData.cs
Source:
CommandCorrelatedEventData.cs
Source:
CommandCorrelatedEventData.cs
Source:
CommandCorrelatedEventData.cs

注意

Use the overload with CommandSource

构造事件有效负载。

public CommandCorrelatedEventData (Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase eventDefinition, Func<Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase,Microsoft.EntityFrameworkCore.Diagnostics.EventData,string> messageGenerator, System.Data.Common.DbConnection connection, Microsoft.EntityFrameworkCore.DbContext context, Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod executeMethod, Guid commandId, Guid connectionId, bool async, DateTimeOffset startTime);
[System.Obsolete("Use the overload with CommandSource")]
public CommandCorrelatedEventData (Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase eventDefinition, Func<Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase,Microsoft.EntityFrameworkCore.Diagnostics.EventData,string> messageGenerator, System.Data.Common.DbConnection connection, Microsoft.EntityFrameworkCore.DbContext? context, Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod executeMethod, Guid commandId, Guid connectionId, bool async, DateTimeOffset startTime);
new Microsoft.EntityFrameworkCore.Diagnostics.CommandCorrelatedEventData : Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase * Func<Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase, Microsoft.EntityFrameworkCore.Diagnostics.EventData, string> * System.Data.Common.DbConnection * Microsoft.EntityFrameworkCore.DbContext * Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod * Guid * Guid * bool * DateTimeOffset -> Microsoft.EntityFrameworkCore.Diagnostics.CommandCorrelatedEventData
[<System.Obsolete("Use the overload with CommandSource")>]
new Microsoft.EntityFrameworkCore.Diagnostics.CommandCorrelatedEventData : Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase * Func<Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase, Microsoft.EntityFrameworkCore.Diagnostics.EventData, string> * System.Data.Common.DbConnection * Microsoft.EntityFrameworkCore.DbContext * Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod * Guid * Guid * bool * DateTimeOffset -> Microsoft.EntityFrameworkCore.Diagnostics.CommandCorrelatedEventData
Public Sub New (eventDefinition As EventDefinitionBase, messageGenerator As Func(Of EventDefinitionBase, EventData, String), connection As DbConnection, context As DbContext, executeMethod As DbCommandMethod, commandId As Guid, connectionId As Guid, async As Boolean, startTime As DateTimeOffset)

参数

eventDefinition
EventDefinitionBase

事件定义。

messageGenerator
Func<EventDefinitionBase,EventData,String>

生成此事件的日志消息的委托。

connection
DbConnection

DbConnection正在使用的 。

context
DbContext

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

executeMethod
DbCommandMethod

DbCommand 方法。

commandId
Guid

一个关联 ID,用于标识正在使用的 DbCommand 实例。

connectionId
Guid

一个关联 ID,用于标识正在使用的 DbConnection 实例。

async
Boolean

指示命令是否以异步方式执行。

startTime
DateTimeOffset

此事件的开始时间。

属性

适用于

CommandCorrelatedEventData(EventDefinitionBase, Func<EventDefinitionBase, EventData,String>, DbConnection, DbContext, DbCommandMethod, Guid, Guid, Boolean, DateTimeOffset, CommandSource)

Source:
CommandCorrelatedEventData.cs
Source:
CommandCorrelatedEventData.cs
Source:
CommandCorrelatedEventData.cs
Source:
CommandCorrelatedEventData.cs

构造事件有效负载。

public CommandCorrelatedEventData (Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase eventDefinition, Func<Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase,Microsoft.EntityFrameworkCore.Diagnostics.EventData,string> messageGenerator, System.Data.Common.DbConnection connection, Microsoft.EntityFrameworkCore.DbContext? context, Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod executeMethod, Guid commandId, Guid connectionId, bool async, DateTimeOffset startTime, Microsoft.EntityFrameworkCore.Diagnostics.CommandSource commandSource);
new Microsoft.EntityFrameworkCore.Diagnostics.CommandCorrelatedEventData : Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase * Func<Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase, Microsoft.EntityFrameworkCore.Diagnostics.EventData, string> * System.Data.Common.DbConnection * Microsoft.EntityFrameworkCore.DbContext * Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod * Guid * Guid * bool * DateTimeOffset * Microsoft.EntityFrameworkCore.Diagnostics.CommandSource -> Microsoft.EntityFrameworkCore.Diagnostics.CommandCorrelatedEventData
Public Sub New (eventDefinition As EventDefinitionBase, messageGenerator As Func(Of EventDefinitionBase, EventData, String), connection As DbConnection, context As DbContext, executeMethod As DbCommandMethod, commandId As Guid, connectionId As Guid, async As Boolean, startTime As DateTimeOffset, commandSource As CommandSource)

参数

eventDefinition
EventDefinitionBase

事件定义。

messageGenerator
Func<EventDefinitionBase,EventData,String>

生成此事件的日志消息的委托。

connection
DbConnection

DbConnection正在使用的 。

context
DbContext

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

executeMethod
DbCommandMethod

DbCommand 方法。

commandId
Guid

一个关联 ID,用于标识正在使用的 DbCommand 实例。

connectionId
Guid

一个关联 ID,用于标识正在使用的 DbConnection 实例。

async
Boolean

指示命令是否以异步方式执行。

startTime
DateTimeOffset

此事件的开始时间。

commandSource
CommandSource

命令的源。

适用于