Compartilhar via


CoreEventId Class

Definition

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

public static class CoreEventId
type CoreEventId = class
Public Class CoreEventId
Inheritance
CoreEventId

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

AccidentalEntityType

An entity type has been mapped as an entity type. If you are mapping this type intentionally, then please suppress this warning and report the issue on GitHub.

AmbiguousEndRequiredWarning

Foreign key configured as required before the dependent end was determined.

CascadeDelete

An entity is being deleted or detached because its parent was deleted.

CascadeDeleteOrphan

An entity is being deleted or detached because the required relationship to its parent was severed.

CollectionChangeDetected

DetectChanges has detected entities were added and/or removed from a collection navigation property.

CollectionWithoutComparer

A property has a collection or enumeration type with a value converter but with no value comparer.

ConflictingForeignKeyAttributesOnNavigationAndPropertyWarning

The ForeignKeyAttribute specified on the navigation doesn't match the ForeignKeyAttribute specified on the property.

ConflictingKeylessAndKeyAttributesWarning

A KeylessAttribute attribute on the entity type is conflicting with a KeyAttribute attribute on at least one of its properties.

ConflictingShadowForeignKeysWarning

The properties that best match the foreign key convention are already used by a different foreign key.

ContextDisposed

The DbContext is being disposed.

ContextInitialized

A DbContext was initialized.

CoreBaseId

The lower-bound for event IDs used by any Entity Framework or provider code.

DetachedLazyLoadingWarning

An attempt was made to lazy-load a property from a detached/no-tracking entity.

DetectChangesCompleted

DetectChanges has completed.

DetectChangesStarting

DetectChanges is starting.

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.

DuplicateDependentEntityTypeInstanceWarning

The same entity is being tracked as a different shared entity entity type. This event is in the DbLoggerCategory.Update category.

ExecutionStrategyRetrying

A transient exception has been encountered during execution and the operation will be retried.

FirstWithoutOrderByAndFilterWarning
Obsolete.

A query uses First/FirstOrDefault operation without OrderBy and filter which may lead to unpredictable results.

ForeignKeyAttributesOnBothNavigationsWarning

Navigations separated into two relationships as ForeignKeyAttribute was specified on navigations on both sides.

ForeignKeyAttributesOnBothPropertiesWarning

Navigations separated into two relationships as ForeignKeyAttribute was specified on properties on both sides.

ForeignKeyChangeDetected

DetectChanges has detected a change in a foreign key property value.

IncludeIgnoredWarning
Obsolete.

A navigation was ignored while compiling a query.

This event is in the DbLoggerCategory.Query category.

IncompatibleMatchingForeignKeyProperties

The best match for foreign key properties are incompatible with the principal key.

InvalidIncludePathError

Invalid include path '{navigationChain}', couldn't find navigation for '{navigationName}'.

LazyLoadOnDisposedContextWarning

An attempt was made to lazy-load a property after the DbContext had been disposed.

ManyServiceProvidersCreatedWarning

Many service providers were created in a single app domain.

MappedComplexPropertyIgnoredWarning

A property was first mapped explicitly and then ignored.

MappedEntityTypeIgnoredWarning

An entity type was first mapped explicitly and then ignored.

MappedNavigationIgnoredWarning

A navigation was first mapped explicitly and then ignored.

MappedPropertyIgnoredWarning

A property was first mapped explicitly and then ignored.

MultipleInversePropertiesSameTargetWarning

There are multiple navigations with InversePropertyAttribute that point to the same inverse navigation.

MultipleNavigationProperties

There are multiple properties that could be navigations to the same type.

MultiplePrimaryKeyCandidates

There are multiple properties that could be used as the primary key.

NavigationBaseIncluded

A navigation base was included in the query.

NavigationBaseIncludeIgnored

A navigation base specific in Include in the query was ignored because it will be populated already due to fix-up.

NavigationIncluded
Obsolete.

A navigation was included in the query.

This event is in the DbLoggerCategory.Query category.

NavigationLazyLoading

A navigation property is being lazy-loaded.

NoEntityTypeConfigurationsWarning

A type that implements IEntityTypeConfiguration<TEntity> could not be instantiated.

NonDefiningInverseNavigationWarning
Obsolete.

The navigation that InversePropertyAttribute points to is not the defining navigation.

NonNullableInverted
Obsolete.

The entity type with the navigation property that has non-nullability was configured as the dependent side in the relationship.

This event is in the DbLoggerCategory.Model category.

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

NonNullableReferenceOnBothNavigations
Obsolete.

Navigations separated into two relationships as non-nullability was specified on both navigations.

This event is in the DbLoggerCategory.Model category.

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

NonNullableReferenceOnDependent
Obsolete.

The non-nullability of the navigation property to the dependent entity was ignored.

This event is in the DbLoggerCategory.Model category.

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

NonOwnershipInverseNavigationWarning

The navigation that InversePropertyAttribute points to is not the defining navigation.

OldModelVersionWarning

The model supplied in the context options was created with an older EF Core version.

OptimisticConcurrencyException

An OptimisticConcurrencyException was thrown during the call to SaveChanges()

PossibleIncorrectRequiredNavigationWithQueryFilterInteractionWarning

Required navigation with principal entity having global query filter defined and the declaring entity not having a matching filter

PossibleUnintendedCollectionNavigationNullComparisonWarning

Possible unintended comparison of collection navigation to null.

PossibleUnintendedReferenceComparisonWarning

Possible unintended reference comparison.

PropertyChangeDetected

DetectChanges has detected a change in a property value.

ProviderBaseId

The lower-bound for event IDs used only by database providers.

ProviderDesignBaseId

The lower-bound for event IDs used only by database provider design-time and tooling.

QueryCanceled

A query was canceled for context type '{contextType}'.

QueryCompilationStarting

Starting query compilation.

QueryExecutionPlanned

A query is planned for execution.

QueryIterationFailed

An error occurred while processing the results of a query.

QueryModelCompiling
Obsolete.

A query model is being compiled.

This event is in the DbLoggerCategory.Query category.

QueryModelOptimized
Obsolete.

A query model was optimized.

This event is in the DbLoggerCategory.Query category.

RedundantAddServicesCallWarning

'AddEntityFramework*' was called on the service provider, but 'UseInternalServiceProvider' wasn't.

RedundantForeignKeyWarning

The configured IForeignKey is redundant.

RedundantIndexRemoved

An index was not created as the properties are already covered.

ReferenceChangeDetected

DetectChanges has detected a change to the entity references by another entity.

RelationalBaseId

The lower-bound for event IDs used by any relational database provider.

RequiredAttributeInverted
Obsolete.

The entity type with the navigation property that has the RequiredAttribute was configured as the dependent side in the relationship.

This event is in the DbLoggerCategory.Model category.

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

RequiredAttributeOnBothNavigations
Obsolete.

Navigations separated into two relationships as RequiredAttribute was specified on both navigations.

This event is in the DbLoggerCategory.Model category.

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

RequiredAttributeOnCollection

The RequiredAttribute on the collection navigation property was ignored.

RequiredAttributeOnDependent
Obsolete.

The RequiredAttribute on the navigation property to the dependent entity was ignored.

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.

RowLimitingOperationWithoutOrderByWarning
Obsolete.

A query uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results.

SaveChangesCanceled

An error occurred while attempting to save changes to the database.

SaveChangesCompleted

SaveChanges() or one of its overloads has completed.

SaveChangesFailed

An error occurred while attempting to save changes to the database.

SaveChangesStarting

SaveChanges() or one of its overloads started.

SensitiveDataLoggingEnabledWarning

A warning indicating that sensitive data logging is enabled and may be logged.

ServiceProviderCreated

A service provider was created for internal use by Entity Framework.

ServiceProviderDebugInfo

Provides debug information for why a new internal service provider was created.

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.

ShadowPropertyCreated

A shadow property has been created.

SkipCollectionChangeDetected

DetectChanges has detected entities were added and/or removed from a collection skip navigation property.

SkippedEntityTypeConfigurationWarning

A type that implements IEntityTypeConfiguration<TEntity> could not be instantiated.

StartedTracking

An entity is being tracked by the DbContext.

StateChanged

An entity tracked by the DbContext is changing from one EntityState to another.

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.

TypeLoadingErrorWarning

An error was ignored while loading types from an assembly.

ValueGenerated

A property of a tracked entity is getting a generated value.

Applies to