Class ConnectionEventData
- Namespace
- Microsoft.EntityFrameworkCore.Diagnostics
- Assembly
- Microsoft.EntityFrameworkCore.Relational.dll
The DiagnosticSource event payload base class for RelationalEventId connection events.
public class ConnectionEventData : DbContextEventData
- Inheritance
-
ConnectionEventData
- Derived
Constructors
ConnectionEventData(EventDefinitionBase, Func<EventDefinitionBase, EventData, string>, DbConnection, DbContext, Guid, bool, DateTimeOffset)
Constructs the event payload.
public ConnectionEventData(EventDefinitionBase eventDefinition, Func<EventDefinitionBase, EventData, string> messageGenerator, DbConnection connection, DbContext context, Guid connectionId, bool async, DateTimeOffset startTime)
Parameters
eventDefinitionEventDefinitionBaseThe event definition.
messageGeneratorFunc<EventDefinitionBase, EventData, string>A delegate that generates a log message for this event.
connectionDbConnectionThe DbConnection.
contextDbContextThe Microsoft.EntityFrameworkCore.DbContext currently being used, to null if not known.
connectionIdGuidA correlation ID that identifies the DbConnection instance being used.
asyncboolIndicates whether or not the operation is happening asynchronously.
startTimeDateTimeOffsetThe start time of this event.
Properties
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
IsAsync
Indicates whether or not the operation is happening asynchronously.
public virtual bool IsAsync { get; }
Property Value
StartTime
The start time of this event.
public virtual DateTimeOffset StartTime { get; }