CommandCorrelatedEventData Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
CommandCorrelatedEventData(EventDefinitionBase, Func<EventDefinitionBase, EventData,String>, DbConnection, DbContext, DbCommandMethod, Guid, Guid, Boolean, DateTimeOffset)
Caution
Use the overload with CommandSource
Constructs the event payload.
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)
Parameters
- eventDefinition
- EventDefinitionBase
The event definition.
- messageGenerator
- Func<EventDefinitionBase,EventData,String>
A delegate that generates a log message for this event.
- connection
- DbConnection
The DbConnection being used.
- executeMethod
- DbCommandMethod
The DbCommand method.
- connectionId
- Guid
A correlation ID that identifies the DbConnection instance being used.
- async
- Boolean
Indicates whether or not the command was executed asynchronously.
- startTime
- DateTimeOffset
The start time of this event.
- Attributes
Applies to
CommandCorrelatedEventData(EventDefinitionBase, Func<EventDefinitionBase, EventData,String>, DbConnection, DbContext, DbCommandMethod, Guid, Guid, Boolean, DateTimeOffset, CommandSource)
Constructs the event payload.
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)
Parameters
- eventDefinition
- EventDefinitionBase
The event definition.
- messageGenerator
- Func<EventDefinitionBase,EventData,String>
A delegate that generates a log message for this event.
- connection
- DbConnection
The DbConnection being used.
- executeMethod
- DbCommandMethod
The DbCommand method.
- connectionId
- Guid
A correlation ID that identifies the DbConnection instance being used.
- async
- Boolean
Indicates whether or not the command was executed asynchronously.
- startTime
- DateTimeOffset
The start time of this event.
- commandSource
- CommandSource
Source of the command.
Applies to
Entity Framework