Table of Contents

Class RelationalEventId

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

Event IDs for relational events that correspond to messages logged to an ILogger and events sent to a DiagnosticSource.

These IDs are also used with Microsoft.EntityFrameworkCore.Diagnostics.WarningsConfigurationBuilder to configure the behavior of warnings.

public static class RelationalEventId
Inheritance
RelationalEventId
Inherited Members

Fields

AllIndexPropertiesNotToMappedToAnyTable

An index specifies properties all of which are not mapped to a column in any table.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Model.Validation category.

This event uses the IndexEventData payload when used with a DiagnosticSource.

public static readonly EventId AllIndexPropertiesNotToMappedToAnyTable

Field Value

EventId

AmbientTransactionEnlisted

Entity Framework enlisted the connection in an ambient transaction.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Transaction category.

This event uses the TransactionEnlistedEventData payload when used with a DiagnosticSource.

public static readonly EventId AmbientTransactionEnlisted

Field Value

EventId

AmbientTransactionWarning

An application may have expected an ambient transaction to be used when it was actually ignored.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Transaction category.

This event uses the ConnectionEventData payload when used with a DiagnosticSource.

public static readonly EventId AmbientTransactionWarning

Field Value

EventId

BatchExecutorFailedToReleaseSavepoint

An error occurred while the batch executor was releasing a transaction savepoint.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Update category.

public static readonly EventId BatchExecutorFailedToReleaseSavepoint

Field Value

EventId

BatchExecutorFailedToRollbackToSavepoint

An error occurred while the batch executor was rolling back the transaction to a savepoint, after an exception occured.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Update category.

public static readonly EventId BatchExecutorFailedToRollbackToSavepoint

Field Value

EventId

BatchReadyForExecution

Update commands were batched and are now ready for execution MinBatchSize(int).

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Update category.

This event uses the BatchEventData payload when used with a DiagnosticSource.

public static readonly EventId BatchReadyForExecution

Field Value

EventId

BatchSmallerThanMinBatchSize

Update commands were not batched because there were fewer than MinBatchSize(int).

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Update category.

This event uses the MinBatchSizeEventData payload when used with a DiagnosticSource.

public static readonly EventId BatchSmallerThanMinBatchSize

Field Value

EventId

BoolWithDefaultWarning

A bool property is configured with a store-generated default.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Model.Validation category.

This event uses the Microsoft.EntityFrameworkCore.Diagnostics.PropertyEventData payload when used with a DiagnosticSource.

public static readonly EventId BoolWithDefaultWarning

Field Value

EventId

CommandCreated

A DbCommand has been created.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Command category.

This event uses the CommandEndEventData payload when used with a DiagnosticSource.

public static readonly EventId CommandCreated

Field Value

EventId

CommandCreating

A DbCommand is being created.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Command category.

This event uses the CommandCorrelatedEventData payload when used with a DiagnosticSource.

public static readonly EventId CommandCreating

Field Value

EventId

CommandError

An error occurred while a database command was executing.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Command category.

This event uses the CommandErrorEventData payload when used with a DiagnosticSource.

public static readonly EventId CommandError

Field Value

EventId

CommandExecuted

A database command has been executed.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Command category.

This event uses the CommandExecutedEventData payload when used with a DiagnosticSource.

public static readonly EventId CommandExecuted

Field Value

EventId

CommandExecuting

A database command is executing.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Command category.

This event uses the CommandEventData payload when used with a DiagnosticSource.

public static readonly EventId CommandExecuting

Field Value

EventId

ConnectionClosed

A database connection has been closed.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Connection category.

This event uses the ConnectionEndEventData payload when used with a DiagnosticSource.

public static readonly EventId ConnectionClosed

Field Value

EventId

ConnectionClosing

A database connection is closing.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Connection category.

This event uses the ConnectionEventData payload when used with a DiagnosticSource.

public static readonly EventId ConnectionClosing

Field Value

EventId

ConnectionError

A error occurred while opening or using a database connection.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Connection category.

This event uses the ConnectionErrorEventData payload when used with a DiagnosticSource.

public static readonly EventId ConnectionError

Field Value

EventId

ConnectionOpened

A database connection has been opened.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Connection category.

This event uses the ConnectionEndEventData payload when used with a DiagnosticSource.

public static readonly EventId ConnectionOpened

Field Value

EventId

ConnectionOpening

A database connection is opening.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Connection category.

This event uses the ConnectionEventData payload when used with a DiagnosticSource.

public static readonly EventId ConnectionOpening

Field Value

EventId

CreatedTransactionSavepoint

A database transaction savepoint has been created.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Transaction category.

This event uses the TransactionEndEventData payload when used with a DiagnosticSource.

public static readonly EventId CreatedTransactionSavepoint

Field Value

EventId

CreatingTransactionSavepoint

A database transaction savepoint is being created.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Transaction category.

This event uses the TransactionEventData payload when used with a DiagnosticSource.

public static readonly EventId CreatingTransactionSavepoint

Field Value

EventId

DataReaderDisposing

A database data reader has been disposed.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Command category.

This event uses the DataReaderDisposingEventData payload when used with a DiagnosticSource.

public static readonly EventId DataReaderDisposing

Field Value

EventId

ExplicitTransactionEnlisted

The connection was explicitly enlisted in a transaction.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Transaction category.

This event uses the TransactionEnlistedEventData payload when used with a DiagnosticSource.

public static readonly EventId ExplicitTransactionEnlisted

Field Value

EventId

ForeignKeyPropertiesMappedToUnrelatedTables

A foreign key specifies properties which don't map to the related tables.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Model.Validation category.

This event uses the Microsoft.EntityFrameworkCore.Diagnostics.ForeignKeyEventData payload when used with a DiagnosticSource.

public static readonly EventId ForeignKeyPropertiesMappedToUnrelatedTables

Field Value

EventId

IndexPropertiesBothMappedAndNotMappedToTable

An index specifies properties some of which are mapped and some of which are not mapped to a column in a table.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Model.Validation category.

This event uses the IndexWithPropertyEventData payload when used with a DiagnosticSource.

public static readonly EventId IndexPropertiesBothMappedAndNotMappedToTable

Field Value

EventId

IndexPropertiesMappedToNonOverlappingTables

An index specifies properties which map to columns on non-overlapping tables.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Model.Validation category.

This event uses the IndexWithPropertiesEventData payload when used with a DiagnosticSource.

public static readonly EventId IndexPropertiesMappedToNonOverlappingTables

Field Value

EventId

MigrateUsingConnection

Migrations is using a database connection.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Migrations category.

This event uses the MigratorConnectionEventData payload when used with a DiagnosticSource.

public static readonly EventId MigrateUsingConnection

Field Value

EventId

MigrationApplying

A migration is being applied.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Migrations category.

This event uses the MigrationEventData payload when used with a DiagnosticSource.

public static readonly EventId MigrationApplying

Field Value

EventId

MigrationAttributeMissingWarning

A MigrationAttribute isn't specified on the class.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Migrations category.

This event uses the MigrationTypeEventData payload when used with a DiagnosticSource.

public static readonly EventId MigrationAttributeMissingWarning

Field Value

EventId

MigrationGeneratingDownScript

Migrations is generating a "down" script.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Migrations category.

This event uses the MigrationScriptingEventData payload when used with a DiagnosticSource.

public static readonly EventId MigrationGeneratingDownScript

Field Value

EventId

MigrationGeneratingUpScript

Migrations is generating an "up" script.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Migrations category.

This event uses the MigrationScriptingEventData payload when used with a DiagnosticSource.

public static readonly EventId MigrationGeneratingUpScript

Field Value

EventId

MigrationReverting

A migration is being reverted.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Migrations category.

This event uses the MigrationEventData payload when used with a DiagnosticSource.

public static readonly EventId MigrationReverting

Field Value

EventId

MigrationsNotApplied

Migrations weren't applied.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Migrations category.

This event uses the MigratorEventData payload when used with a DiagnosticSource.

public static readonly EventId MigrationsNotApplied

Field Value

EventId

MigrationsNotFound

Migrations weren't found.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Migrations category.

This event uses the MigrationAssemblyEventData payload when used with a DiagnosticSource.

public static readonly EventId MigrationsNotFound

Field Value

EventId

ModelValidationKeyDefaultValueWarning

A single database default column value has been set on a key column.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Model.Validation category.

This event uses the Microsoft.EntityFrameworkCore.Diagnostics.PropertyEventData payload when used with a DiagnosticSource.

public static readonly EventId ModelValidationKeyDefaultValueWarning

Field Value

EventId

MultipleCollectionIncludeWarning

A query is loading multiple related collections without configuring a QuerySplittingBehavior.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Query category.

public static readonly EventId MultipleCollectionIncludeWarning

Field Value

EventId

QueryPossibleExceptionWithAggregateOperatorWarning

A query is using a possibly throwing aggregate operation in a sub-query.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Query category.

[Obsolete]
public static readonly EventId QueryPossibleExceptionWithAggregateOperatorWarning

Field Value

EventId

QueryPossibleUnintendedUseOfEqualsWarning

A query is using equals comparisons in a possibly unintended way.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Query category.

This event uses the TwoSqlExpressionsEventData payload when used with a DiagnosticSource.

public static readonly EventId QueryPossibleUnintendedUseOfEqualsWarning

Field Value

EventId

ReleasedTransactionSavepoint

A database transaction savepoint has been released.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Transaction category.

This event uses the TransactionEndEventData payload when used with a DiagnosticSource.

public static readonly EventId ReleasedTransactionSavepoint

Field Value

EventId

ReleasingTransactionSavepoint

A database transaction savepoint is being released.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Transaction category.

This event uses the TransactionEventData payload when used with a DiagnosticSource.

public static readonly EventId ReleasingTransactionSavepoint

Field Value

EventId

RolledBackToTransactionSavepoint

A database transaction has been rolled back to a savepoint.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Transaction category.

This event uses the TransactionEndEventData payload when used with a DiagnosticSource.

public static readonly EventId RolledBackToTransactionSavepoint

Field Value

EventId

RollingBackToTransactionSavepoint

A database transaction is being rolled back to a savepoint.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Transaction category.

This event uses the TransactionEventData payload when used with a DiagnosticSource.

public static readonly EventId RollingBackToTransactionSavepoint

Field Value

EventId

TransactionCommitted

A database transaction has been committed.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Transaction category.

This event uses the TransactionEndEventData payload when used with a DiagnosticSource.

public static readonly EventId TransactionCommitted

Field Value

EventId

TransactionCommitting

A database transaction is being committed.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Transaction category.

This event uses the TransactionEventData payload when used with a DiagnosticSource.

public static readonly EventId TransactionCommitting

Field Value

EventId

TransactionDisposed

A database transaction has been disposed.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Transaction category.

This event uses the TransactionEventData payload when used with a DiagnosticSource.

public static readonly EventId TransactionDisposed

Field Value

EventId

TransactionError

An error has occurred while using. committing, or rolling back a database transaction.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Transaction category.

This event uses the TransactionErrorEventData payload when used with a DiagnosticSource.

public static readonly EventId TransactionError

Field Value

EventId

TransactionRolledBack

A database transaction has been rolled back.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Transaction category.

This event uses the TransactionEndEventData payload when used with a DiagnosticSource.

public static readonly EventId TransactionRolledBack

Field Value

EventId

TransactionRollingBack

A database transaction is being rolled back.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Transaction category.

This event uses the TransactionEventData payload when used with a DiagnosticSource.

public static readonly EventId TransactionRollingBack

Field Value

EventId

TransactionStarted

A database transaction has been started.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Transaction category.

This event uses the TransactionEndEventData payload when used with a DiagnosticSource.

public static readonly EventId TransactionStarted

Field Value

EventId

TransactionStarting

A database transaction is starting.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Transaction category.

This event uses the TransactionStartingEventData payload when used with a DiagnosticSource.

public static readonly EventId TransactionStarting

Field Value

EventId

TransactionUsed

Entity Framework started using an already existing database transaction.

This event is in the Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Transaction category.

This event uses the TransactionEventData payload when used with a DiagnosticSource.

public static readonly EventId TransactionUsed

Field Value

EventId