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
Remarks
See Logging, events, and diagnostics for more information and examples.
Constructors
CommandExecutedEventData(EventDefinitionBase, Func<EventDefinitionBase, EventData, string>, DbConnection, DbCommand, DbContext?, DbCommandMethod, Guid, Guid, object?, bool, bool, DateTimeOffset, TimeSpan, CommandSource)
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, CommandSource commandSource)
Parameters
eventDefinitionEventDefinitionBaseThe event definition.
messageGeneratorFunc<EventDefinitionBase, EventData, string>A delegate that generates a log message for this event.
connectionDbConnectionThe DbConnection being used.
commandDbCommandThe DbCommand that was executing when it failed.
contextDbContextThe Microsoft.EntityFrameworkCore.DbContext currently being used, to null if not known.
executeMethodDbCommandMethodThe DbCommand method that was used to execute the command.
commandIdGuidA correlation ID that identifies the DbCommand instance being used.
connectionIdGuidA correlation ID that identifies the DbConnection instance being used.
resultobjectThe result of executing the operation.
asyncboolIndicates whether or not the command was executed asynchronously.
logParameterValuesboolIndicates whether or not the application allows logging of parameter values.
startTimeDateTimeOffsetThe start time of this event.
durationTimeSpanThe duration this event.
commandSourceCommandSourceSource of the command.
Properties
Result
The result of executing the command.
public virtual object? Result { get; }