Share via


CommandExecutedEventData Constructors

Definition

Overloads

CommandExecutedEventData(EventDefinitionBase, Func<EventDefinitionBase, EventData,String>, DbCommand, DbCommandMethod, Guid, Guid, Object, Boolean, Boolean, DateTimeOffset, TimeSpan)

Constructs the event payload.

CommandExecutedEventData(EventDefinitionBase, Func<EventDefinitionBase, EventData,String>, DbConnection, DbCommand, DbContext, DbCommandMethod, Guid, Guid, Object, Boolean, Boolean, DateTimeOffset, TimeSpan)
Obsolete.

Constructs the event payload.

CommandExecutedEventData(EventDefinitionBase, Func<EventDefinitionBase, EventData,String>, DbConnection, DbCommand, DbContext, DbCommandMethod, Guid, Guid, Object, Boolean, Boolean, DateTimeOffset, TimeSpan, CommandSource)

Constructs the event payload.

CommandExecutedEventData(EventDefinitionBase, Func<EventDefinitionBase, EventData,String>, DbCommand, DbCommandMethod, Guid, Guid, Object, Boolean, Boolean, DateTimeOffset, TimeSpan)

Constructs the event payload.

public CommandExecutedEventData (Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase eventDefinition, Func<Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase,Microsoft.EntityFrameworkCore.Diagnostics.EventData,string> messageGenerator, System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod executeMethod, Guid commandId, Guid connectionId, object result, bool async, bool logParameterValues, DateTimeOffset startTime, TimeSpan duration);
new Microsoft.EntityFrameworkCore.Diagnostics.CommandExecutedEventData : Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase * Func<Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase, Microsoft.EntityFrameworkCore.Diagnostics.EventData, string> * System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod * Guid * Guid * obj * bool * bool * DateTimeOffset * TimeSpan -> Microsoft.EntityFrameworkCore.Diagnostics.CommandExecutedEventData
Public Sub New (eventDefinition As EventDefinitionBase, messageGenerator As Func(Of EventDefinitionBase, EventData, String), command As DbCommand, executeMethod As DbCommandMethod, commandId As Guid, connectionId As Guid, result As Object, async As Boolean, logParameterValues As Boolean, startTime As DateTimeOffset, duration As TimeSpan)

Parameters

eventDefinition
EventDefinitionBase

The event definition.

messageGenerator
Func<EventDefinitionBase,EventData,String>

A delegate that generates a log message for this event.

command
DbCommand

The DbCommand that was executing when it failed.

executeMethod
DbCommandMethod

The DbCommand method that was used to execute the command.

commandId
Guid

A correlation ID that identifies the DbCommand instance being used.

connectionId
Guid

A correlation ID that identifies the DbConnection instance being used.

result
Object

The result of executing the operation.

async
Boolean

Indicates whether or not the command was executed asynchronously.

logParameterValues
Boolean

Indicates whether or not the application allows logging of parameter values.

startTime
DateTimeOffset

The start time of this event.

duration
TimeSpan

The duration this event.

Applies to

CommandExecutedEventData(EventDefinitionBase, Func<EventDefinitionBase, EventData,String>, DbConnection, DbCommand, DbContext, DbCommandMethod, Guid, Guid, Object, Boolean, Boolean, DateTimeOffset, TimeSpan)

Caution

Use the overload with CommandSource

Constructs the event payload.

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

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.

command
DbCommand

The DbCommand that was executing when it failed.

context
DbContext

The DbContext currently being used, to null if not known.

executeMethod
DbCommandMethod

The DbCommand method that was used to execute the command.

commandId
Guid

A correlation ID that identifies the DbCommand instance being used.

connectionId
Guid

A correlation ID that identifies the DbConnection instance being used.

result
Object

The result of executing the operation.

async
Boolean

Indicates whether or not the command was executed asynchronously.

logParameterValues
Boolean

Indicates whether or not the application allows logging of parameter values.

startTime
DateTimeOffset

The start time of this event.

duration
TimeSpan

The duration this event.

Attributes

Applies to

CommandExecutedEventData(EventDefinitionBase, Func<EventDefinitionBase, EventData,String>, DbConnection, DbCommand, DbContext, DbCommandMethod, Guid, Guid, Object, Boolean, Boolean, DateTimeOffset, TimeSpan, CommandSource)

Constructs the event payload.

public CommandExecutedEventData (Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase eventDefinition, Func<Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase,Microsoft.EntityFrameworkCore.Diagnostics.EventData,string> messageGenerator, System.Data.Common.DbConnection connection, System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.DbContext? context, Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod executeMethod, Guid commandId, Guid connectionId, object? result, bool async, bool logParameterValues, DateTimeOffset startTime, TimeSpan duration, Microsoft.EntityFrameworkCore.Diagnostics.CommandSource commandSource);
new Microsoft.EntityFrameworkCore.Diagnostics.CommandExecutedEventData : Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase * Func<Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase, Microsoft.EntityFrameworkCore.Diagnostics.EventData, string> * System.Data.Common.DbConnection * System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.DbContext * Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod * Guid * Guid * obj * bool * bool * DateTimeOffset * TimeSpan * Microsoft.EntityFrameworkCore.Diagnostics.CommandSource -> Microsoft.EntityFrameworkCore.Diagnostics.CommandExecutedEventData
Public Sub New (eventDefinition As EventDefinitionBase, messageGenerator As Func(Of EventDefinitionBase, EventData, String), connection As DbConnection, command As DbCommand, context As DbContext, executeMethod As DbCommandMethod, commandId As Guid, connectionId As Guid, result As Object, async As Boolean, logParameterValues As Boolean, startTime As DateTimeOffset, duration As TimeSpan, 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.

command
DbCommand

The DbCommand that was executing when it failed.

context
DbContext

The DbContext currently being used, to null if not known.

executeMethod
DbCommandMethod

The DbCommand method that was used to execute the command.

commandId
Guid

A correlation ID that identifies the DbCommand instance being used.

connectionId
Guid

A correlation ID that identifies the DbConnection instance being used.

result
Object

The result of executing the operation.

async
Boolean

Indicates whether or not the command was executed asynchronously.

logParameterValues
Boolean

Indicates whether or not the application allows logging of parameter values.

startTime
DateTimeOffset

The start time of this event.

duration
TimeSpan

The duration this event.

commandSource
CommandSource

Source of the command.

Applies to