共用方式為


CoreLoggerExtensions 類別

定義

這個類別包含 EF Core 內部和資料庫提供者用來將資訊 ILogger 寫入 至 和 DiagnosticListener 的靜態方法,以用於已知事件。

此類型通常由資料庫提供者 (和其他延伸模組) 使用。 它通常不會用於應用程式程式碼。

public static class CoreLoggerExtensions
type CoreLoggerExtensions = class
Public Module CoreLoggerExtensions
繼承
CoreLoggerExtensions

備註

如需詳細資訊 和範例,請參閱資料庫提供者和延伸模組的實作

方法

AmbiguousEndRequiredWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, IForeignKey)

AmbiguousEndRequiredWarning事件的記錄。

CascadeDelete(IDiagnosticsLogger<DbLoggerCategory.Update>, InternalEntityEntry, InternalEntityEntry, EntityState)

CascadeDelete事件的記錄。

CascadeDeleteOrphan(IDiagnosticsLogger<DbLoggerCategory.Update>, InternalEntityEntry, IEntityType, EntityState)

CascadeDeleteOrphan事件的記錄。

CascadeDeleteOrphanSensitive(IDiagnosticsLogger<DbLoggerCategory.Update>, InternalEntityEntry, IEntityType, EntityState)

CascadeDeleteOrphan事件的記錄。

CascadeDeleteSensitive(IDiagnosticsLogger<DbLoggerCategory.Update>, InternalEntityEntry, InternalEntityEntry, EntityState)

CascadeDelete事件的記錄。

CollectionChangeDetected(IDiagnosticsLogger<DbLoggerCategory.ChangeTracking>, InternalEntityEntry, INavigation, ISet<Object>, ISet<Object>)

CollectionChangeDetected事件的記錄。

CollectionChangeDetectedSensitive(IDiagnosticsLogger<DbLoggerCategory.ChangeTracking>, InternalEntityEntry, INavigation, ISet<Object>, ISet<Object>)

CollectionChangeDetected事件的記錄。

CollectionWithoutComparer(IDiagnosticsLogger<DbLoggerCategory.Model.Validation>, IProperty)

CollectionWithoutComparer事件的記錄。

ConflictingForeignKeyAttributesOnNavigationAndPropertyWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, INavigation, MemberInfo)

ConflictingForeignKeyAttributesOnNavigationAndPropertyWarning事件的記錄。

ConflictingForeignKeyAttributesOnNavigationAndPropertyWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, IReadOnlyNavigation, MemberInfo)

ConflictingForeignKeyAttributesOnNavigationAndPropertyWarning事件的記錄。

ConflictingKeylessAndKeyAttributesWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, IProperty)

ConflictingKeylessAndKeyAttributesWarning事件的記錄。

ConflictingKeylessAndKeyAttributesWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, IReadOnlyProperty)

ConflictingKeylessAndKeyAttributesWarning事件的記錄。

ConflictingShadowForeignKeysWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, IForeignKey)

ConflictingShadowForeignKeysWarning事件的記錄。

ConflictingShadowForeignKeysWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, IReadOnlyForeignKey)

ConflictingShadowForeignKeysWarning事件的記錄。

ContextDisposed(IDiagnosticsLogger<DbLoggerCategory.Infrastructure>, DbContext)

ContextDisposed事件的記錄。

ContextInitialized(IDiagnosticsLogger<DbLoggerCategory.Infrastructure>, DbContext, DbContextOptions)

ContextInitialized事件的記錄。

DetachedLazyLoadingWarning(IDiagnosticsLogger<DbLoggerCategory.Infrastructure>, DbContext, Object, String)

DetachedLazyLoadingWarning事件的記錄。

DetectChangesCompleted(IDiagnosticsLogger<DbLoggerCategory.ChangeTracking>, DbContext)

DetectChangesCompleted事件的記錄。

DetectChangesStarting(IDiagnosticsLogger<DbLoggerCategory.ChangeTracking>, DbContext)

DetectChangesStarting事件的記錄。

DistinctAfterOrderByWithoutRowLimitingOperatorWarning(IDiagnosticsLogger<DbLoggerCategory.Query>)

DistinctAfterOrderByWithoutRowLimitingOperatorWarning事件的記錄。

DuplicateDependentEntityTypeInstanceWarning(IDiagnosticsLogger<DbLoggerCategory.Update>, IEntityType, IEntityType)

DuplicateDependentEntityTypeInstanceWarning事件的記錄。

ExecutionStrategyRetrying(IDiagnosticsLogger<DbLoggerCategory.Infrastructure>, IReadOnlyList<Exception>, TimeSpan, Boolean)

ExecutionStrategyRetrying事件的記錄。

FirstWithoutOrderByAndFilterWarning(IDiagnosticsLogger<DbLoggerCategory.Query>)

FirstWithoutOrderByAndFilterWarning事件的記錄。

ForeignKeyAttributesOnBothNavigationsWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, INavigation, INavigation)

ForeignKeyAttributesOnBothNavigationsWarning事件的記錄。

ForeignKeyAttributesOnBothNavigationsWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, IReadOnlyNavigation, IReadOnlyNavigation)

ForeignKeyAttributesOnBothNavigationsWarning事件的記錄。

ForeignKeyAttributesOnBothPropertiesWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, INavigation, INavigation, MemberInfo, MemberInfo)

ForeignKeyAttributesOnBothPropertiesWarning事件的記錄。

ForeignKeyAttributesOnBothPropertiesWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, IReadOnlyNavigation, IReadOnlyNavigation, MemberInfo, MemberInfo)

ForeignKeyAttributesOnBothPropertiesWarning事件的記錄。

ForeignKeyChangeDetected(IDiagnosticsLogger<DbLoggerCategory.ChangeTracking>, InternalEntityEntry, IProperty, Object, Object)

ForeignKeyChangeDetected事件的記錄。

ForeignKeyChangeDetectedSensitive(IDiagnosticsLogger<DbLoggerCategory.ChangeTracking>, InternalEntityEntry, IProperty, Object, Object)

ForeignKeyChangeDetected事件的記錄。

IncompatibleMatchingForeignKeyProperties(IDiagnosticsLogger<DbLoggerCategory.Model>, IReadOnlyList<IPropertyBase>, IReadOnlyList<IPropertyBase>)

IncompatibleMatchingForeignKeyProperties事件的記錄。

IncompatibleMatchingForeignKeyProperties(IDiagnosticsLogger<DbLoggerCategory.Model>, String, String, IReadOnlyList<IPropertyBase>, IReadOnlyList<IPropertyBase>)

IncompatibleMatchingForeignKeyProperties事件的記錄。

IncompatibleMatchingForeignKeyProperties(IDiagnosticsLogger<DbLoggerCategory.Model>, String, String, IReadOnlyList<IReadOnlyPropertyBase>, IReadOnlyList<IReadOnlyPropertyBase>)

IncompatibleMatchingForeignKeyProperties事件的記錄。

InvalidIncludePathError(IDiagnosticsLogger<DbLoggerCategory.Query>, String, String)

InvalidIncludePathError事件的記錄。

LazyLoadOnDisposedContextWarning(IDiagnosticsLogger<DbLoggerCategory.Infrastructure>, DbContext, Object, String)

LazyLoadOnDisposedContextWarning事件的記錄。

ManyServiceProvidersCreatedWarning(IDiagnosticsLogger<DbLoggerCategory.Infrastructure>, ICollection<IServiceProvider>)

ManyServiceProvidersCreatedWarning事件的記錄。

MappedComplexPropertyIgnoredWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, IComplexProperty)

MappedComplexPropertyIgnoredWarning事件的記錄。

MappedEntityTypeIgnoredWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, IEntityType)

MappedEntityTypeIgnoredWarning事件的記錄。

MappedNavigationIgnoredWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, INavigationBase)

MappedNavigationIgnoredWarning事件的記錄。

MappedPropertyIgnoredWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, IProperty)

MappedPropertyIgnoredWarning事件的記錄。

MultipleInversePropertiesSameTargetWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, IEnumerable<Tuple<MemberInfo,Type>>, MemberInfo, Type)

MultipleInversePropertiesSameTargetWarning事件的記錄。

MultipleNavigationProperties(IDiagnosticsLogger<DbLoggerCategory.Model>, IEnumerable<Tuple<MemberInfo,Type>>, IEnumerable<Tuple<MemberInfo,Type>>)

MultipleNavigationProperties事件的記錄。

MultiplePrimaryKeyCandidates(IDiagnosticsLogger<DbLoggerCategory.Model>, IProperty, IProperty)

MultiplePrimaryKeyCandidates事件的記錄。

MultiplePrimaryKeyCandidates(IDiagnosticsLogger<DbLoggerCategory.Model>, IReadOnlyProperty, IReadOnlyProperty)

MultiplePrimaryKeyCandidates事件的記錄。

NavigationBaseIncluded(IDiagnosticsLogger<DbLoggerCategory.Query>, INavigationBase)

NavigationBaseIncluded事件的記錄。

NavigationBaseIncludeIgnored(IDiagnosticsLogger<DbLoggerCategory.Query>, INavigationBase)

NavigationBaseIncludeIgnored事件的記錄。

NavigationLazyLoading(IDiagnosticsLogger<DbLoggerCategory.Infrastructure>, DbContext, Object, String)

NavigationLazyLoading事件的記錄。

NonDefiningInverseNavigationWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, IEntityType, MemberInfo, IEntityType, MemberInfo, MemberInfo)
已過時。.

NonDefiningInverseNavigationWarning事件的記錄。

NonNullableInverted(IDiagnosticsLogger<DbLoggerCategory.Model>, INavigation)
已過時。.

NonNullableInverted事件的記錄。

NonNullableReferenceOnBothNavigations(IDiagnosticsLogger<DbLoggerCategory.Model>, INavigation, INavigation)
已過時。.

NonNullableReferenceOnBothNavigations事件的記錄。

NonNullableReferenceOnBothNavigations(IDiagnosticsLogger<DbLoggerCategory.Model>, IReadOnlyNavigation, IReadOnlyNavigation)
已過時。.

NonNullableReferenceOnBothNavigations事件的記錄。

NonNullableReferenceOnDependent(IDiagnosticsLogger<DbLoggerCategory.Model>, INavigation)
已過時。.

NonNullableReferenceOnDependent事件的記錄。

NonOwnershipInverseNavigationWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, IEntityType, MemberInfo, IEntityType, MemberInfo, MemberInfo)

NonOwnershipInverseNavigationWarning事件的記錄。

NonOwnershipInverseNavigationWarning(IDiagnosticsLogger<DbLoggerCategory.Model>, IReadOnlyEntityType, MemberInfo, IReadOnlyEntityType, MemberInfo, MemberInfo)

NonOwnershipInverseNavigationWarning事件的記錄。

OldModelVersionWarning(IDiagnosticsLogger<DbLoggerCategory.Infrastructure>, DbContext, DbContextOptions)

OldModelVersionWarning事件的記錄。

OptimisticConcurrencyException(IDiagnosticsLogger<DbLoggerCategory.Update>, DbContext, Exception)

OptimisticConcurrencyException事件的記錄。

OptimisticConcurrencyException(IDiagnosticsLogger<DbLoggerCategory.Update>, DbContext, IReadOnlyList<IUpdateEntry>, DbUpdateConcurrencyException, Func<DbContext,DbUpdateConcurrencyException,IReadOnlyList<IUpdateEntry>, EventDefinition<Exception>,ConcurrencyExceptionEventData>)

OptimisticConcurrencyException事件的記錄。

OptimisticConcurrencyExceptionAsync(IDiagnosticsLogger<DbLoggerCategory.Update>, DbContext, Exception, CancellationToken)

OptimisticConcurrencyException事件的記錄。

OptimisticConcurrencyExceptionAsync(IDiagnosticsLogger<DbLoggerCategory.Update>, DbContext, IReadOnlyList<IUpdateEntry>, DbUpdateConcurrencyException, Func<DbContext,DbUpdateConcurrencyException,IReadOnlyList<IUpdateEntry>, EventDefinition<Exception>,ConcurrencyExceptionEventData>, CancellationToken)

OptimisticConcurrencyException事件的記錄。

PossibleIncorrectRequiredNavigationWithQueryFilterInteractionWarning(IDiagnosticsLogger<DbLoggerCategory.Model.Validation>, IForeignKey)

PossibleIncorrectRequiredNavigationWithQueryFilterInteractionWarning事件的記錄。

PossibleUnintendedCollectionNavigationNullComparisonWarning(IDiagnosticsLogger<DbLoggerCategory.Query>, INavigation)

PossibleUnintendedCollectionNavigationNullComparisonWarning事件的記錄。

PossibleUnintendedReferenceComparisonWarning(IDiagnosticsLogger<DbLoggerCategory.Query>, Expression, Expression)

PossibleUnintendedReferenceComparisonWarning事件的記錄。

PropertyChangeDetected(IDiagnosticsLogger<DbLoggerCategory.ChangeTracking>, InternalEntityEntry, IProperty, Object, Object)

PropertyChangeDetected事件的記錄。

PropertyChangeDetectedSensitive(IDiagnosticsLogger<DbLoggerCategory.ChangeTracking>, InternalEntityEntry, IProperty, Object, Object)

PropertyChangeDetected事件的記錄。

QueryCanceled(IDiagnosticsLogger<DbLoggerCategory.Query>, Type)

QueryCanceled事件的記錄。

QueryCompilationStarting(IDiagnosticsLogger<DbLoggerCategory.Query>, DbContext, ExpressionPrinter, Expression)

QueryCompilationStarting事件的記錄。

QueryCompilationStarting(IDiagnosticsLogger<DbLoggerCategory.Query>, ExpressionPrinter, Expression)

QueryCompilationStarting事件的記錄。

QueryExecutionPlanned(IDiagnosticsLogger<DbLoggerCategory.Query>, DbContext, ExpressionPrinter, Expression)

QueryExecutionPlanned事件的記錄。

QueryExecutionPlanned(IDiagnosticsLogger<DbLoggerCategory.Query>, ExpressionPrinter, Expression)

QueryExecutionPlanned事件的記錄。

QueryIterationFailed(IDiagnosticsLogger<DbLoggerCategory.Query>, Type, Exception)

QueryIterationFailed事件的記錄。

RedundantAddServicesCallWarning(IDiagnosticsLogger<DbLoggerCategory.Infrastructure>, IServiceProvider)

RedundantAddServicesCallWarning事件的記錄。

RedundantForeignKeyWarning(IDiagnosticsLogger<DbLoggerCategory.Model.Validation>, IForeignKey)

RedundantForeignKeyWarning事件的記錄。

RedundantIndexRemoved(IDiagnosticsLogger<DbLoggerCategory.Model>, IReadOnlyList<IPropertyBase>, IReadOnlyList<IPropertyBase>)

RedundantIndexRemoved事件的記錄。

RedundantIndexRemoved(IDiagnosticsLogger<DbLoggerCategory.Model>, IReadOnlyList<IReadOnlyPropertyBase>, IReadOnlyList<IReadOnlyPropertyBase>)

RedundantIndexRemoved事件的記錄。

ReferenceChangeDetected(IDiagnosticsLogger<DbLoggerCategory.ChangeTracking>, InternalEntityEntry, INavigation, Object, Object)

ReferenceChangeDetected事件的記錄。

ReferenceChangeDetectedSensitive(IDiagnosticsLogger<DbLoggerCategory.ChangeTracking>, InternalEntityEntry, INavigation, Object, Object)

ReferenceChangeDetected事件的記錄。

RequiredAttributeInverted(IDiagnosticsLogger<DbLoggerCategory.Model>, INavigation)
已過時。.

RequiredAttributeInverted事件的記錄。

RequiredAttributeOnBothNavigations(IDiagnosticsLogger<DbLoggerCategory.Model>, INavigation, INavigation)
已過時。.

RequiredAttributeOnBothNavigations事件的記錄。

RequiredAttributeOnBothNavigations(IDiagnosticsLogger<DbLoggerCategory.Model>, IReadOnlyNavigation, IReadOnlyNavigation)
已過時。.

RequiredAttributeOnBothNavigations事件的記錄。

RequiredAttributeOnCollection(IDiagnosticsLogger<DbLoggerCategory.Model>, INavigation)

RequiredAttributeOnCollection事件的記錄。

RequiredAttributeOnCollection(IDiagnosticsLogger<DbLoggerCategory.Model>, IReadOnlyNavigation)

RequiredAttributeOnCollection事件的記錄。

RequiredAttributeOnDependent(IDiagnosticsLogger<DbLoggerCategory.Model>, INavigation)
已過時。.

RequiredAttributeOnDependent事件的記錄。

RequiredAttributeOnSkipNavigation(IDiagnosticsLogger<DbLoggerCategory.Model>, IReadOnlySkipNavigation)

RequiredAttributeOnSkipNavigation事件的記錄。

RequiredAttributeOnSkipNavigation(IDiagnosticsLogger<DbLoggerCategory.Model>, ISkipNavigation)

RequiredAttributeOnSkipNavigation事件的記錄。

RowLimitingOperationWithoutOrderByWarning(IDiagnosticsLogger<DbLoggerCategory.Query>)

RowLimitingOperationWithoutOrderByWarning事件的記錄。

SaveChangesCanceled(IDiagnosticsLogger<DbLoggerCategory.Update>, DbContext)

SaveChangesFailed事件的記錄。

SaveChangesCanceledAsync(IDiagnosticsLogger<DbLoggerCategory.Update>, DbContext, CancellationToken)

SaveChangesFailed事件的記錄。

SaveChangesCompleted(IDiagnosticsLogger<DbLoggerCategory.Update>, DbContext, Int32)

SaveChangesCompleted事件的記錄。

SaveChangesCompletedAsync(IDiagnosticsLogger<DbLoggerCategory.Update>, DbContext, Int32, CancellationToken)

SaveChangesCompleted事件的記錄。

SaveChangesFailed(IDiagnosticsLogger<DbLoggerCategory.Update>, DbContext, Exception)

SaveChangesFailed事件的記錄。

SaveChangesFailedAsync(IDiagnosticsLogger<DbLoggerCategory.Update>, DbContext, Exception, CancellationToken)

SaveChangesFailed事件的記錄。

SaveChangesStarting(IDiagnosticsLogger<DbLoggerCategory.Update>, DbContext)

SaveChangesStarting事件的記錄。

SaveChangesStartingAsync(IDiagnosticsLogger<DbLoggerCategory.Update>, DbContext, CancellationToken)

SaveChangesStarting事件的記錄。

SensitiveDataLoggingEnabledWarning<TLoggerCategory>(IDiagnosticsLogger<TLoggerCategory>)

SensitiveDataLoggingEnabledWarning事件的記錄。

ServiceProviderCreated(IDiagnosticsLogger<DbLoggerCategory.Infrastructure>, IServiceProvider)

ServiceProviderCreated事件的記錄。

ServiceProviderDebugInfo(IDiagnosticsLogger<DbLoggerCategory.Infrastructure>, IDictionary<String,String>, IList<IDictionary<String,String>>)

ServiceProviderDebugInfo事件的記錄。

ShadowForeignKeyPropertyCreated(IDiagnosticsLogger<DbLoggerCategory.Model.Validation>, IProperty, String)

ShadowForeignKeyPropertyCreated事件的記錄。

ShadowPropertyCreated(IDiagnosticsLogger<DbLoggerCategory.Model.Validation>, IProperty)

ShadowPropertyCreated事件的記錄。

SkipCollectionChangeDetected(IDiagnosticsLogger<DbLoggerCategory.ChangeTracking>, InternalEntityEntry, ISkipNavigation, ISet<Object>, ISet<Object>)

CollectionChangeDetected事件的記錄。

SkipCollectionChangeDetectedSensitive(IDiagnosticsLogger<DbLoggerCategory.ChangeTracking>, InternalEntityEntry, ISkipNavigation, ISet<Object>, ISet<Object>)

CollectionChangeDetected事件的記錄。

StartedTracking(IDiagnosticsLogger<DbLoggerCategory.ChangeTracking>, InternalEntityEntry)

StartedTracking事件的記錄。

StartedTrackingSensitive(IDiagnosticsLogger<DbLoggerCategory.ChangeTracking>, InternalEntityEntry)

StartedTracking事件的記錄。

StateChanged(IDiagnosticsLogger<DbLoggerCategory.ChangeTracking>, InternalEntityEntry, EntityState, EntityState)

StateChanged事件的記錄。

StateChangedSensitive(IDiagnosticsLogger<DbLoggerCategory.ChangeTracking>, InternalEntityEntry, EntityState, EntityState)

StateChanged事件的記錄。

StringEnumValueInJson(IDiagnosticsLogger<DbLoggerCategory.Query>, Type)

StringEnumValueInJson事件的記錄。

ValueGenerated(IDiagnosticsLogger<DbLoggerCategory.ChangeTracking>, InternalEntityEntry, IProperty, Object, Boolean)

ValueGenerated事件的記錄。

ValueGeneratedSensitive(IDiagnosticsLogger<DbLoggerCategory.ChangeTracking>, InternalEntityEntry, IProperty, Object, Boolean)

ValueGenerated事件的記錄。

適用於