Share via


DbContextErrorEventData Class

Definition

A DiagnosticSource event payload class for error events that reference a DbContext.

public class DbContextErrorEventData : Microsoft.EntityFrameworkCore.Diagnostics.DbContextEventData, Microsoft.EntityFrameworkCore.Diagnostics.IErrorEventData
type DbContextErrorEventData = class
    inherit DbContextEventData
    interface IErrorEventData
Public Class DbContextErrorEventData
Inherits DbContextEventData
Implements IErrorEventData
Inheritance
DbContextErrorEventData
Derived
Implements

Remarks

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

Constructors

DbContextErrorEventData(EventDefinitionBase, Func<EventDefinitionBase,EventData,String>, DbContext, Exception)

Constructs the event payload.

Properties

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)
Exception

The exception that triggered this event.

LogLevel

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

(Inherited from EventData)

Methods

ToString()

A logger message describing this event.

(Inherited from EventData)

Applies to