CommandCorrelatedEventData Class

Definition

The DiagnosticSource event payload for events correlated with a DbCommand.

[System.Runtime.CompilerServices.Nullable(0)]
public class CommandCorrelatedEventData : Microsoft.EntityFrameworkCore.Diagnostics.DbContextEventData
public class CommandCorrelatedEventData : Microsoft.EntityFrameworkCore.Diagnostics.DbContextEventData
[<System.Runtime.CompilerServices.Nullable(0)>]
type CommandCorrelatedEventData = class
    inherit DbContextEventData
type CommandCorrelatedEventData = class
    inherit DbContextEventData
Public Class CommandCorrelatedEventData
Inherits DbContextEventData
Inheritance
CommandCorrelatedEventData
Derived
Attributes

Remarks

See Logging, events, and diagnostics for more information and examples.

Constructors

Name Description
CommandCorrelatedEventData(EventDefinitionBase, Func<EventDefinitionBase, EventData,String>, DbConnection, DbContext, DbCommandMethod, Guid, Guid, Boolean, DateTimeOffset, CommandSource)

Constructs the event payload.

CommandCorrelatedEventData(EventDefinitionBase, Func<EventDefinitionBase, EventData,String>, DbConnection, DbContext, DbCommandMethod, Guid, Guid, Boolean, DateTimeOffset)
Obsolete.

Constructs the event payload.

Properties

Name Description
CommandId

A correlation ID that identifies the DbCommand instance being used.

CommandSource

Source of the command.

Connection

The DbConnection.

ConnectionId

A correlation ID that identifies the DbConnection instance being used.

Context

The current DbContext.

(Inherited from DbContextEventData)
EventId

The EventId that defines the message ID and name.

(Inherited from EventData)
EventIdCode

A string representing the code where this event is defined.

(Inherited from EventData)
ExecuteMethod

The DbCommandMethod method.

IsAsync

Indicates whether or not the operation is being executed asynchronously.

LogLevel

The LogLevel that would be used to log message for this event.

(Inherited from EventData)
StartTime

The start time of this event.

Methods

Name Description
ToString()

A logger message describing this event.

(Inherited from EventData)

Applies to