Class CommandCorrelatedEventData
- Namespace
- Microsoft.EntityFrameworkCore.Diagnostics
- Assembly
- Microsoft.EntityFrameworkCore.Relational.dll
The DiagnosticSource event payload for events correlated with a DbCommand.
public class CommandCorrelatedEventData : DbContextEventData
- Inheritance
-
CommandCorrelatedEventData
- Derived
Constructors
CommandCorrelatedEventData(EventDefinitionBase, Func<EventDefinitionBase, EventData, string>, DbConnection, DbContext, DbCommandMethod, Guid, Guid, bool, DateTimeOffset)
Constructs the event payload.
public CommandCorrelatedEventData(EventDefinitionBase eventDefinition, Func<EventDefinitionBase, EventData, string> messageGenerator, DbConnection connection, DbContext context, DbCommandMethod executeMethod, Guid commandId, Guid connectionId, bool async, DateTimeOffset startTime)
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.
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.
startTime
DateTimeOffsetThe start time of this event.
Properties
CommandId
A correlation ID that identifies the DbCommand instance being used.
public virtual Guid CommandId { get; }
Property Value
Connection
The DbConnection.
public virtual DbConnection Connection { get; }
Property Value
ConnectionId
A correlation ID that identifies the DbConnection instance being used.
public virtual Guid ConnectionId { get; }
Property Value
ExecuteMethod
The DbCommandMethod method.
public virtual DbCommandMethod ExecuteMethod { get; }
Property Value
IsAsync
Indicates whether or not the operation is being executed asynchronously.
public virtual bool IsAsync { get; }
Property Value
StartTime
The start time of this event.
public virtual DateTimeOffset StartTime { get; }