Table of Contents

Class ConnectionErrorEventData

Namespace
Microsoft.EntityFrameworkCore.Diagnostics
Assembly
Microsoft.EntityFrameworkCore.Relational.dll

The DiagnosticSource event payload for ConnectionError.

public class ConnectionErrorEventData : ConnectionEndEventData, IErrorEventData
Inheritance
ConnectionErrorEventData
Implements
IErrorEventData
Inherited Members

Constructors

ConnectionErrorEventData(EventDefinitionBase, Func<EventDefinitionBase, EventData, string>, DbConnection, DbContext, Guid, Exception, bool, DateTimeOffset, TimeSpan)

Constructs the event payload.

public ConnectionErrorEventData(EventDefinitionBase eventDefinition, Func<EventDefinitionBase, EventData, string> messageGenerator, DbConnection connection, DbContext context, Guid connectionId, Exception exception, bool async, DateTimeOffset startTime, TimeSpan duration)

Parameters

eventDefinition EventDefinitionBase

The event definition.

messageGenerator Func<EventDefinitionBase, EventData, string>

A delegate that generates a log message for this event.

connection DbConnection

The DbConnection.

context DbContext

The Microsoft.EntityFrameworkCore.DbContext currently being used, to null if not known.

connectionId Guid

A correlation ID that identifies the DbConnection instance being used.

exception Exception

The exception that was thrown when the connection failed.

async bool

Indicates whether or not the operation is happening asynchronously.

startTime DateTimeOffset

The start time of this event.

duration TimeSpan

The duration this event.

Properties

Exception

The exception that was thrown when the connection failed.

public virtual Exception Exception { get; }

Property Value

Exception