Class CommandEndEventData
- Namespace
- Microsoft.EntityFrameworkCore.Diagnostics
- Assembly
- Microsoft.EntityFrameworkCore.Relational.dll
The DiagnosticSource event payload for RelationalEventId command end events.
public class CommandEndEventData : CommandEventData
- Inheritance
-
CommandEndEventData
- Derived
- Inherited Members
Remarks
See Logging, events, and diagnostics for more information and examples.
Constructors
CommandEndEventData(EventDefinitionBase, Func<EventDefinitionBase, EventData, string>, DbConnection, DbCommand, DbContext?, DbCommandMethod, Guid, Guid, bool, bool, DateTimeOffset, TimeSpan, CommandSource)
Constructs the event payload.
public CommandEndEventData(EventDefinitionBase eventDefinition, Func<EventDefinitionBase, EventData, string> messageGenerator, DbConnection connection, DbCommand command, DbContext? context, DbCommandMethod executeMethod, Guid commandId, Guid connectionId, bool async, bool logParameterValues, DateTimeOffset startTime, TimeSpan duration, CommandSource commandSource)
Parameters
eventDefinition
EventDefinitionBaseThe event definition.
messageGenerator
Func<EventDefinitionBase, EventData, string>A delegate that generates a log message for this event.
connection
DbConnectionThe DbConnection being used.
command
DbCommandThe DbCommand.
context
DbContextThe Microsoft.EntityFrameworkCore.DbContext currently being used, to null if not known.
executeMethod
DbCommandMethodThe DbCommand method.
commandId
GuidA correlation ID that identifies the DbCommand instance being used.
connectionId
GuidA correlation ID that identifies the DbConnection instance being used.
async
boolIndicates whether or not the command was executed asynchronously.
logParameterValues
boolIndicates whether or not the application allows logging of parameter values.
startTime
DateTimeOffsetThe start time of this event.
duration
TimeSpanThe duration this event.
commandSource
CommandSourceSource of the command.
Properties
Duration
The duration this event.
public virtual TimeSpan Duration { get; }