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
EventDefinitionBaseThe event definition.
messageGenerator
Func<EventDefinitionBase, EventData, string>A delegate that generates a log message for this event.
connection
DbConnectionThe DbConnection.
context
DbContextThe Microsoft.EntityFrameworkCore.DbContext currently being used, to null if not known.
connectionId
GuidA correlation ID that identifies the DbConnection instance being used.
exception
ExceptionThe exception that was thrown when the connection failed.
async
boolIndicates whether or not the operation is happening asynchronously.
startTime
DateTimeOffsetThe start time of this event.
duration
TimeSpanThe duration this event.
Properties
Exception
The exception that was thrown when the connection failed.
public virtual Exception Exception { get; }