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
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.
exceptionExceptionThe exception that was thrown when the connection failed.
asyncboolIndicates whether or not the operation is happening asynchronously.
startTimeDateTimeOffsetThe start time of this event.
durationTimeSpanThe duration this event.
Properties
Exception
The exception that was thrown when the connection failed.
public virtual Exception Exception { get; }