Table of Contents

Class CommandExecutedEventData

Namespace
Microsoft.EntityFrameworkCore.Diagnostics
Assembly
Microsoft.EntityFrameworkCore.Relational.dll

The DiagnosticSource event payload for CommandExecuted.

public class CommandExecutedEventData : CommandEndEventData
Inheritance
CommandExecutedEventData
Inherited Members

Constructors

CommandExecutedEventData(EventDefinitionBase, Func<EventDefinitionBase, EventData, string>, DbConnection, DbCommand, DbContext, DbCommandMethod, Guid, Guid, object, bool, bool, DateTimeOffset, TimeSpan)

Constructs the event payload.

public CommandExecutedEventData(EventDefinitionBase eventDefinition, Func<EventDefinitionBase, EventData, string> messageGenerator, DbConnection connection, DbCommand command, DbContext context, DbCommandMethod executeMethod, Guid commandId, Guid connectionId, object result, bool async, bool logParameterValues, DateTimeOffset startTime, TimeSpan duration)

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 Microsoft.EntityFrameworkCore.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 bool

Indicates whether or not the command was executed asynchronously.

logParameterValues bool

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.

Properties

Result

The result of executing the command.

public virtual object Result { get; }

Property Value

object