Class CoreEventId
- Namespace
- Microsoft.EntityFrameworkCore.Diagnostics
- Assembly
- Microsoft.EntityFrameworkCore.dll
Event IDs for events that correspond to messages logged to an ILogger and events sent to a DiagnosticSource.
public static class CoreEventId
- Inheritance
-
CoreEventId
- Inherited Members
Remarks
These IDs are also used with WarningsConfigurationBuilder to configure the behavior of warnings.
See Logging, events, and diagnostics for more information and examples.
Fields
AmbiguousEndRequiredWarning
Foreign key configured as required before the dependent end was determined.
public static readonly EventId AmbiguousEndRequiredWarning
Field Value
Remarks
This event is in the DbLoggerCategory.Model category.
This event uses the ForeignKeyEventData payload when used with a DiagnosticSource.
CascadeDelete
An entity is being deleted or detached because its parent was deleted.
public static readonly EventId CascadeDelete
Field Value
Remarks
This event is in the DbLoggerCategory.Update category.
This event uses the CascadeDeleteEventData payload when used with a DiagnosticSource.
CascadeDeleteOrphan
An entity is being deleted or detached because the required relationship to its parent was severed.
public static readonly EventId CascadeDeleteOrphan
Field Value
Remarks
This event is in the DbLoggerCategory.Update category.
This event uses the CascadeDeleteOrphanEventData payload when used with a DiagnosticSource.
CollectionChangeDetected
DetectChanges has detected entities were added and/or removed from a collection navigation property.
public static readonly EventId CollectionChangeDetected
Field Value
Remarks
This event is in the DbLoggerCategory.ChangeTracking category.
This event uses the CollectionChangedEventData payload when used with a DiagnosticSource.
CollectionWithoutComparer
A property has a collection or enumeration type with a value converter but with no value comparer.
public static readonly EventId CollectionWithoutComparer
Field Value
Remarks
This event is in the DbLoggerCategory.Model.Validation category.
This event uses the PropertyEventData payload when used with a DiagnosticSource.
ConflictingForeignKeyAttributesOnNavigationAndPropertyWarning
The ForeignKeyAttribute specified on the navigation doesn't match the ForeignKeyAttribute specified on the property.
public static readonly EventId ConflictingForeignKeyAttributesOnNavigationAndPropertyWarning
Field Value
Remarks
This event is in the DbLoggerCategory.Model category.
This event uses the TwoPropertyBaseCollectionsEventData payload when used with a DiagnosticSource.
ConflictingKeylessAndKeyAttributesWarning
A Microsoft.EntityFrameworkCore.KeylessAttribute attribute on the entity type is conflicting with a KeyAttribute attribute on at least one of its properties.
public static readonly EventId ConflictingKeylessAndKeyAttributesWarning
Field Value
Remarks
This event is in the DbLoggerCategory.Model category.
This event uses the PropertyEventData payload when used with a DiagnosticSource.
ConflictingShadowForeignKeysWarning
The properties that best match the foreign key convention are already used by a different foreign key.
public static readonly EventId ConflictingShadowForeignKeysWarning
Field Value
Remarks
This event is in the DbLoggerCategory.Model category.
This event uses the ForeignKeyEventData payload when used with a DiagnosticSource.
ContextDisposed
The DbContext is being disposed.
public static readonly EventId ContextDisposed
Field Value
Remarks
This event is in the DbLoggerCategory.Infrastructure category.
This event uses the DbContextEventData payload when used with a DiagnosticSource.
ContextInitialized
A DbContext was initialized.
public static readonly EventId ContextInitialized
Field Value
Remarks
This event is in the DbLoggerCategory.Infrastructure category.
This event uses the ContextInitializedEventData payload when used with a DiagnosticSource.
CoreBaseId
The lower-bound for event IDs used by any Entity Framework or provider code.
public const int CoreBaseId = 10000
Field Value
DetachedLazyLoadingWarning
An attempt was made to lazy-load a property from a detached/no-tracking entity.
public static readonly EventId DetachedLazyLoadingWarning
Field Value
Remarks
This event is in the DbLoggerCategory.Infrastructure category.
This event uses the LazyLoadingEventData payload when used with a DiagnosticSource.
DetectChangesCompleted
DetectChanges has completed.
public static readonly EventId DetectChangesCompleted
Field Value
Remarks
This event is in the DbLoggerCategory.ChangeTracking category.
This event uses the DbContextEventData payload when used with a DiagnosticSource.
DetectChangesStarting
DetectChanges is starting.
public static readonly EventId DetectChangesStarting
Field Value
Remarks
This event is in the DbLoggerCategory.ChangeTracking category.
This event uses the DbContextEventData payload when used with a DiagnosticSource.
DistinctAfterOrderByWithoutRowLimitingOperatorWarning
The query uses the 'Distinct' operator after applying an ordering. If there are any row limiting operation used before Distinct
and after ordering then ordering will be used for it.
Ordering(s) will be erased after Distinct
and results afterwards would be unordered.
public static readonly EventId DistinctAfterOrderByWithoutRowLimitingOperatorWarning
Field Value
Remarks
This event is in the DbLoggerCategory.Query category.
DuplicateDependentEntityTypeInstanceWarning
The same entity is being tracked as a different shared entity entity type. This event is in the DbLoggerCategory.Update category.
public static readonly EventId DuplicateDependentEntityTypeInstanceWarning
Field Value
ExecutionStrategyRetrying
A transient exception has been encountered during execution and the operation will be retried.
public static readonly EventId ExecutionStrategyRetrying
Field Value
Remarks
This event is in the DbLoggerCategory.Infrastructure category.
This event uses the ContextInitializedEventData payload when used with a DiagnosticSource.
FirstWithoutOrderByAndFilterWarning
A query uses First/FirstOrDefault operation without OrderBy and filter which may lead to unpredictable results.
public static readonly EventId FirstWithoutOrderByAndFilterWarning
Field Value
Remarks
This event is in the DbLoggerCategory.Query category.
ForeignKeyAttributesOnBothNavigationsWarning
Navigations separated into two relationships as ForeignKeyAttribute was specified on navigations on both sides.
public static readonly EventId ForeignKeyAttributesOnBothNavigationsWarning
Field Value
Remarks
This event is in the DbLoggerCategory.Model category.
This event uses the TwoPropertyBaseCollectionsEventData payload when used with a DiagnosticSource.
ForeignKeyAttributesOnBothPropertiesWarning
Navigations separated into two relationships as ForeignKeyAttribute was specified on properties on both sides.
public static readonly EventId ForeignKeyAttributesOnBothPropertiesWarning
Field Value
Remarks
This event is in the DbLoggerCategory.Model category.
This event uses the TwoPropertyBaseCollectionsEventData payload when used with a DiagnosticSource.
ForeignKeyChangeDetected
DetectChanges has detected a change in a foreign key property value.
public static readonly EventId ForeignKeyChangeDetected
Field Value
Remarks
This event is in the DbLoggerCategory.ChangeTracking category.
This event uses the PropertyChangedEventData payload when used with a DiagnosticSource.
IncompatibleMatchingForeignKeyProperties
The best match for foreign key properties are incompatible with the principal key.
public static readonly EventId IncompatibleMatchingForeignKeyProperties
Field Value
Remarks
This event is in the DbLoggerCategory.Model category.
This event uses the TwoPropertyBaseCollectionsEventData payload when used with a DiagnosticSource.
InvalidIncludePathError
Invalid include path '{navigationChain}', couldn't find navigation for '{navigationName}'.
public static readonly EventId InvalidIncludePathError
Field Value
Remarks
This event is in the DbLoggerCategory.Query category.
This event uses the InvalidIncludePathEventData payload when used with a DiagnosticSource.
LazyLoadOnDisposedContextWarning
An attempt was made to lazy-load a property after the DbContext had been disposed.
public static readonly EventId LazyLoadOnDisposedContextWarning
Field Value
Remarks
This event is in the DbLoggerCategory.Infrastructure category.
This event uses the LazyLoadingEventData payload when used with a DiagnosticSource.
ManyServiceProvidersCreatedWarning
Many service providers were created in a single app domain.
public static readonly EventId ManyServiceProvidersCreatedWarning
Field Value
Remarks
This event is in the DbLoggerCategory.Infrastructure category.
This event uses the ServiceProvidersEventData payload when used with a DiagnosticSource.
MappedComplexPropertyIgnoredWarning
A property was first mapped explicitly and then ignored.
public static readonly EventId MappedComplexPropertyIgnoredWarning
Field Value
Remarks
This event is in the DbLoggerCategory.Model category.
This event uses the ComplexPropertyEventData payload when used with a DiagnosticSource.
See Modeling entity types and relationships for more information and examples.
MappedEntityTypeIgnoredWarning
An entity type was first mapped explicitly and then ignored.
public static readonly EventId MappedEntityTypeIgnoredWarning
Field Value
Remarks
This event is in the DbLoggerCategory.Model category.
This event uses the EntityTypeEventData payload when used with a DiagnosticSource.
See Modeling entity types and relationships for more information and examples.
MappedNavigationIgnoredWarning
A navigation was first mapped explicitly and then ignored.
public static readonly EventId MappedNavigationIgnoredWarning
Field Value
Remarks
This event is in the DbLoggerCategory.Model category.
This event uses the NavigationBaseEventData payload when used with a DiagnosticSource.
See Modeling entity types and relationships for more information and examples.
MappedPropertyIgnoredWarning
A property was first mapped explicitly and then ignored.
public static readonly EventId MappedPropertyIgnoredWarning
Field Value
Remarks
This event is in the DbLoggerCategory.Model category.
This event uses the PropertyEventData payload when used with a DiagnosticSource.
See Modeling entity types and relationships for more information and examples.
MultipleInversePropertiesSameTargetWarning
There are multiple navigations with InversePropertyAttribute that point to the same inverse navigation.
public static readonly EventId MultipleInversePropertiesSameTargetWarning
Field Value
Remarks
This event is in the DbLoggerCategory.Model category.
This event uses the TwoPropertyBaseCollectionsEventData payload when used with a DiagnosticSource.
MultipleNavigationProperties
There are multiple properties that could be navigations to the same type.
public static readonly EventId MultipleNavigationProperties
Field Value
Remarks
This event is in the DbLoggerCategory.Model category.
This event uses the TwoUnmappedPropertyCollectionsEventData payload when used with a DiagnosticSource.
MultiplePrimaryKeyCandidates
There are multiple properties that could be used as the primary key.
public static readonly EventId MultiplePrimaryKeyCandidates
Field Value
Remarks
This event is in the DbLoggerCategory.Model category.
This event uses the TwoPropertyBaseCollectionsEventData payload when used with a DiagnosticSource.
NavigationBaseIncludeIgnored
A navigation base specific in Include in the query was ignored because it will be populated already due to fix-up.
public static readonly EventId NavigationBaseIncludeIgnored
Field Value
Remarks
This event is in the DbLoggerCategory.Query category.
This event uses the NavigationBaseEventData payload when used with a DiagnosticSource.
NavigationBaseIncluded
A navigation base was included in the query.
public static readonly EventId NavigationBaseIncluded
Field Value
Remarks
This event is in the DbLoggerCategory.Query category.
This event uses the NavigationBaseEventData payload when used with a DiagnosticSource.
NavigationLazyLoading
A navigation property is being lazy-loaded.
public static readonly EventId NavigationLazyLoading
Field Value
Remarks
This event is in the DbLoggerCategory.Infrastructure category.
This event uses the LazyLoadingEventData payload when used with a DiagnosticSource.
NonDefiningInverseNavigationWarning
The navigation that InversePropertyAttribute points to is not the defining navigation.
[Obsolete("Log message with this event Id has been removed.")]
public static readonly EventId NonDefiningInverseNavigationWarning
Field Value
Remarks
This event is in the DbLoggerCategory.Model category.
This event uses the TwoUnmappedPropertyCollectionsEventData payload when used with a DiagnosticSource.
NonOwnershipInverseNavigationWarning
The navigation that InversePropertyAttribute points to is not the defining navigation.
public static readonly EventId NonOwnershipInverseNavigationWarning
Field Value
Remarks
This event is in the DbLoggerCategory.Model category.
This event uses the TwoUnmappedPropertyCollectionsEventData payload when used with a DiagnosticSource.
OldModelVersionWarning
The model supplied in the context options was created with an older EF Core version.
public static readonly EventId OldModelVersionWarning
Field Value
Remarks
This event is in the DbLoggerCategory.Infrastructure category.
This event uses the ContextInitializedEventData payload when used with a DiagnosticSource.
OptimisticConcurrencyException
An OptimisticConcurrencyException was thrown during the call to SaveChanges()
public static readonly EventId OptimisticConcurrencyException
Field Value
Remarks
This event is in the DbLoggerCategory.Update category.
This event uses the DbContextErrorEventData payload when used with a DiagnosticSource.
PossibleIncorrectRequiredNavigationWithQueryFilterInteractionWarning
Required navigation with principal entity having global query filter defined and the declaring entity not having a matching filter
public static readonly EventId PossibleIncorrectRequiredNavigationWithQueryFilterInteractionWarning
Field Value
Remarks
This event is in the DbLoggerCategory.Model.Validation category.
This event uses the ForeignKeyEventData payload when used with a DiagnosticSource.
PossibleUnintendedCollectionNavigationNullComparisonWarning
Possible unintended comparison of collection navigation to null.
public static readonly EventId PossibleUnintendedCollectionNavigationNullComparisonWarning
Field Value
Remarks
This event is in the DbLoggerCategory.Query category.
This event uses the NavigationEventData payload when used with a DiagnosticSource.
PossibleUnintendedReferenceComparisonWarning
Possible unintended reference comparison.
public static readonly EventId PossibleUnintendedReferenceComparisonWarning
Field Value
Remarks
This event is in the DbLoggerCategory.Query category.
This event uses the BinaryExpressionEventData payload when used with a DiagnosticSource.
PropertyChangeDetected
DetectChanges has detected a change in a property value.
public static readonly EventId PropertyChangeDetected
Field Value
Remarks
This event is in the DbLoggerCategory.ChangeTracking category.
This event uses the PropertyChangedEventData payload when used with a DiagnosticSource.
ProviderBaseId
The lower-bound for event IDs used only by database providers.
public const int ProviderBaseId = 30000
Field Value
ProviderDesignBaseId
The lower-bound for event IDs used only by database provider design-time and tooling.
public const int ProviderDesignBaseId = 35000
Field Value
QueryCanceled
A query was canceled for context type '{contextType}'.
public static readonly EventId QueryCanceled
Field Value
Remarks
This event is in the DbLoggerCategory.Query category.
QueryCompilationStarting
Starting query compilation.
public static readonly EventId QueryCompilationStarting
Field Value
Remarks
This event is in the DbLoggerCategory.Query category.
This event uses the QueryExpressionEventData payload when used with a DiagnosticSource.
QueryExecutionPlanned
A query is planned for execution.
public static readonly EventId QueryExecutionPlanned
Field Value
Remarks
This event is in the DbLoggerCategory.Query category.
This event uses the QueryExpressionEventData payload when used with a DiagnosticSource.
QueryIterationFailed
An error occurred while processing the results of a query.
public static readonly EventId QueryIterationFailed
Field Value
Remarks
This event is in the DbLoggerCategory.Query category.
This event uses the DbContextTypeErrorEventData payload when used with a DiagnosticSource.
RedundantAddServicesCallWarning
'AddEntityFramework*' was called on the service provider, but 'UseInternalServiceProvider' wasn't.
public static readonly EventId RedundantAddServicesCallWarning
Field Value
Remarks
This event is in the DbLoggerCategory.Infrastructure category.
This event uses the ServiceProviderEventData payload when used with a DiagnosticSource.
RedundantForeignKeyWarning
The configured IForeignKey is redundant.
public static readonly EventId RedundantForeignKeyWarning
Field Value
Remarks
This event is in the DbLoggerCategory.Model.Validation category.
This event uses the ForeignKeyEventData payload when used with a DiagnosticSource.
RedundantIndexRemoved
An index was not created as the properties are already covered.
public static readonly EventId RedundantIndexRemoved
Field Value
Remarks
This event is in the DbLoggerCategory.Model.Validation category.
This event uses the TwoPropertyBaseCollectionsEventData payload when used with a DiagnosticSource.
ReferenceChangeDetected
DetectChanges has detected a change to the entity references by another entity.
public static readonly EventId ReferenceChangeDetected
Field Value
Remarks
This event is in the DbLoggerCategory.ChangeTracking category.
This event uses the ReferenceChangedEventData payload when used with a DiagnosticSource.
RelationalBaseId
The lower-bound for event IDs used by any relational database provider.
public const int RelationalBaseId = 20000
Field Value
RequiredAttributeOnCollection
The RequiredAttribute on the collection navigation property was ignored.
public static readonly EventId RequiredAttributeOnCollection
Field Value
Remarks
This event is in the DbLoggerCategory.Model category.
This event uses the NavigationEventData payload when used with a DiagnosticSource.
RequiredAttributeOnSkipNavigation
The RequiredAttribute on the skip navigation property was ignored.
public static readonly EventId RequiredAttributeOnSkipNavigation
Field Value
Remarks
This event is in the DbLoggerCategory.Model category.
This event uses the SkipNavigationEventData payload when used with a DiagnosticSource.
RowLimitingOperationWithoutOrderByWarning
A query uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results.
public static readonly EventId RowLimitingOperationWithoutOrderByWarning
Field Value
Remarks
This event is in the DbLoggerCategory.Query category.
SaveChangesCanceled
An error occurred while attempting to save changes to the database.
public static readonly EventId SaveChangesCanceled
Field Value
Remarks
This event is in the DbLoggerCategory.Update category.
This event uses the DbContextErrorEventData payload when used with a DiagnosticSource.
SaveChangesCompleted
SaveChanges() or one of its overloads has completed.
public static readonly EventId SaveChangesCompleted
Field Value
Remarks
This event is in the DbLoggerCategory.Update category.
This event uses the SaveChangesCompletedEventData payload when used with a DiagnosticSource.
SaveChangesFailed
An error occurred while attempting to save changes to the database.
public static readonly EventId SaveChangesFailed
Field Value
Remarks
This event is in the DbLoggerCategory.Update category.
This event uses the DbContextErrorEventData payload when used with a DiagnosticSource.
SaveChangesStarting
SaveChanges() or one of its overloads started.
public static readonly EventId SaveChangesStarting
Field Value
Remarks
This event is in the DbLoggerCategory.Update category.
This event uses the DbContextEventData payload when used with a DiagnosticSource.
SensitiveDataLoggingEnabledWarning
A warning indicating that sensitive data logging is enabled and may be logged.
public static readonly EventId SensitiveDataLoggingEnabledWarning
Field Value
Remarks
This event may be in different categories depending on where sensitive data is being logged.
This event uses the EventData payload when used with a DiagnosticSource.
ServiceProviderCreated
A service provider was created for internal use by Entity Framework.
public static readonly EventId ServiceProviderCreated
Field Value
Remarks
This event is in the DbLoggerCategory.Infrastructure category.
This event uses the ServiceProviderEventData payload when used with a DiagnosticSource.
ServiceProviderDebugInfo
Provides debug information for why a new internal service provider was created.
public static readonly EventId ServiceProviderDebugInfo
Field Value
Remarks
This event is in the DbLoggerCategory.Infrastructure category.
This event uses the ServiceProviderDebugInfoEventData payload when used with a DiagnosticSource.
ShadowForeignKeyPropertyCreated
A foreign key property was created in shadow state because a conflicting property with the simple name for this foreign key exists in the entity type, but is either not mapped, is already used for another relationship, or is incompatible with the associated primary key type.
public static readonly EventId ShadowForeignKeyPropertyCreated
Field Value
Remarks
This event is in the DbLoggerCategory.Model category.
This event uses the UniquifiedPropertyEventData payload when used with a DiagnosticSource.
See Modeling entity types and relationships for more information and examples.
ShadowPropertyCreated
A shadow property has been created.
public static readonly EventId ShadowPropertyCreated
Field Value
Remarks
This event is in the DbLoggerCategory.Model category.
This event uses the PropertyEventData payload when used with a DiagnosticSource.
SkipCollectionChangeDetected
DetectChanges has detected entities were added and/or removed from a collection skip navigation property.
public static readonly EventId SkipCollectionChangeDetected
Field Value
Remarks
This event is in the DbLoggerCategory.ChangeTracking category.
This event uses the SkipCollectionChangedEventData payload when used with a DiagnosticSource.
StartedTracking
An entity is being tracked by the DbContext.
public static readonly EventId StartedTracking
Field Value
Remarks
This event is in the DbLoggerCategory.ChangeTracking category.
This event uses the EntityEntryEventData payload when used with a DiagnosticSource.
StateChanged
An entity tracked by the DbContext is changing from one EntityState to another.
public static readonly EventId StateChanged
Field Value
Remarks
This event is in the DbLoggerCategory.ChangeTracking category.
This event uses the StateChangedEventData payload when used with a DiagnosticSource.
StringEnumValueInJson
A string value for an enum was read from JSON. Starting with EF Core 8, a breaking change was made to store enum values in JSON as numbers by default. See https://aka.ms/efcore-docs-jsonenums for details.
public static readonly EventId StringEnumValueInJson
Field Value
Remarks
This event is in the DbLoggerCategory.Query category.
ValueGenerated
A property of a tracked entity is getting a generated value.
public static readonly EventId ValueGenerated
Field Value
Remarks
This event is in the DbLoggerCategory.ChangeTracking category.
This event uses the PropertyValueEventData payload when used with a DiagnosticSource.