Partager via


Microsoft.EntityFrameworkCore.Diagnostics Namespace

Classes

AbstractionsStrings

String resources used in EF exceptions, etc.

These strings are exposed publicly for use by database providers and extensions. It is unusual for application code to need these strings.

AssemblyEventData

A DiagnosticSource event payload class for assembly events.

BatchEventData

The DiagnosticSource event payload for RelationalEventId batch events.

BinaryExpressionEventData

A DiagnosticSource event payload class for events that have a query expression.

CascadeDeleteEventData

A DiagnosticSource event payload class for events that indicate an entity is being deleted because its parent entity has been deleted.

CascadeDeleteOrphanEventData

A DiagnosticSource event payload class for events that indicate an entity is being deleted because its required relationship to a parent has been severed.

CollectionChangedEventData

A DiagnosticSource event payload class for events that indicate a collection navigation property has had entities added and/or removed.

ColumnsEventData

A DiagnosticSource event payload class for events that have columns.

CommandCorrelatedEventData

The DiagnosticSource event payload for events correlated with a DbCommand.

CommandEndEventData

The DiagnosticSource event payload for RelationalEventId command end events.

CommandErrorEventData

The DiagnosticSource event payload for CommandError.

CommandEventData

The DiagnosticSource event payload for RelationalEventId command events.

CommandExecutedEventData

The DiagnosticSource event payload for CommandExecuted.

ComplexPropertyEventData

A DiagnosticSource event payload class for events that have a property.

ConcurrencyExceptionEventData

A DiagnosticSource event payload used when a DbUpdateConcurrencyException is being thrown.

ConflictingValueGenerationStrategiesEventData

A DiagnosticSource event payload class for events that have a property.

ConnectionCreatedEventData

The DiagnosticSource event payload for ConnectionCreated events.

ConnectionCreatingEventData

The DiagnosticSource event payload for ConnectionCreating events.

ConnectionEndEventData

The DiagnosticSource event payload class for RelationalEventId connection ending events.

ConnectionErrorEventData

The DiagnosticSource event payload for ConnectionError.

ConnectionEventData

The DiagnosticSource event payload base class for RelationalEventId connection events.

ContextInitializedEventData

A DiagnosticSource event payload class for context initialization events.

CoreEventId

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

CoreLoggerExtensions

This class contains static methods used by EF Core internals and database providers to write information to an ILogger and a DiagnosticListener for well-known events.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

CoreStrings

String resources used in EF exceptions, etc.

These strings are exposed publicly for use by database providers and extensions. It is unusual for application code to need these strings.

CosmosEventId

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

CosmosItemCommandExecutedEventData

A DiagnosticSource event payload class for Cosmos item command executed events.

CosmosQueryEventData

A DiagnosticSource event payload class for Cosmos query events.

CosmosQueryExecutedEventData

A DiagnosticSource event payload class for Cosmos query events.

CosmosReadItemEventData

A DiagnosticSource event payload class for Cosmos read-item events.

DataReaderClosingEventData

DiagnosticSource event payload for DataReaderClosing.

DataReaderDisposingEventData

DiagnosticSource event payload for DataReaderDisposing.

DataReaderEventData

DiagnosticSource event payload for DataReaderClosing.

DbCommandInterceptor

Abstract base class for IDbCommandInterceptor for use when implementing a subset of the interface methods.

DbConnectionInterceptor

Abstract base class for IDbConnectionInterceptor for use when implementing a subset of the interface methods.

DbContextErrorEventData

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

DbContextEventData

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

DbContextTypeErrorEventData

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

DbContextTypeEventData

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

DbTransactionInterceptor

Abstract base class for IDbTransactionInterceptor for use when implementing a subset of the interface methods.

EntityEntryEventData

A DiagnosticSource event payload class for events that reference a EntityEntry.

EntityTypeEventData

A DiagnosticSource event payload class for events that have an entity type.

EntityTypeSchemaEventData

The DiagnosticSource event payload base class for events that reference an entity type and a schema

EventData

A base class for all Entity Framework DiagnosticSource event payloads.

EventDefinition

Defines metadata for an event with no parameters and a cached delegate to log the event with reduced allocations.

EventDefinition<TParam>

Defines metadata for an event with one parameter and a cached delegate to log the event with reduced allocations.

EventDefinition<TParam1,TParam2>

Defines metadata for an event with three parameters and a cached delegate to log the event with reduced allocations.

EventDefinition<TParam1,TParam2,TParam3>

Defines metadata for an event with three parameters and a cached delegate to log the event with reduced allocations.

EventDefinition<TParam1,TParam2,TParam3,TParam4>

Defines metadata for an event with three parameters and a cached delegate to log the event with reduced allocations.

EventDefinition<TParam1,TParam2,TParam3,TParam4,TParam5>

Defines metadata for an event with three parameters and a cached delegate to log the event with reduced allocations.

EventDefinition<TParam1,TParam2,TParam3,TParam4,TParam5,TParam6>

Defines metadata for an event with three parameters and a cached delegate to log the event with reduced allocations.

EventDefinitionBase

Base class for event definitions.

EventDefinitionBase.MessageExtractingLogger

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

ExecutionStrategyEventData

The DiagnosticSource event payload for CoreEventId execution strategy events.

ExpressionEventData

A DiagnosticSource event payload class for events that have a query expression.

FallbackEventDefinition

Defines metadata for an event with more than six parameters such that it has to have special handling.

ForeignKeyCandidateEventData

A DiagnosticSource event payload class for incompatible foreign key properties.

ForeignKeyEventData

A DiagnosticSource event payload class for events that have a foreign key.

IgnoringIdentityResolutionInterceptor

A IIdentityResolutionInterceptor that ignores the new instance and retains property values from the existing tracked instance.

IncludeEventData

A DiagnosticSource event payload class for events that have an Include<TEntity,TProperty>(IQueryable<TEntity>, Expression<Func<TEntity,TProperty>>) specification.

IndexEventData

A DiagnosticSource event payload class for the events involving an invalid index.

IndexWithPropertiesEventData

A DiagnosticSource event payload class for the IndexPropertiesMappedToNonOverlappingTables event.

IndexWithPropertyEventData

A DiagnosticSource event payload class for the events involving an invalid property name on an index.

InMemoryEventId

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

InterceptorAggregator<TInterceptor>

Abstract base class for implementations of the IInterceptorAggregator service.

InvalidIncludePathEventData

A DiagnosticSource event payload class for events that have invalid include path information.

KeyEventData

A DiagnosticSource event payload class for events that have a key.

LazyLoadingEventData

A DiagnosticSource event payload class for events from ILazyLoader

LoggerCategory<T>

Generic helper class used to implement the Name property.

LoggingDefinitions

Contains placeholders for caching of EventDefinitionBase.

This class is public so that it can be inherited by database providers to add caching for their events. It should not be used for any other purpose.

MigrationAssemblyEventData

The DiagnosticSource event payload for RelationalEventId migrations assembly events.

MigrationColumnOperationEventData

The DiagnosticSource event payload for events that reference a Migrations column operation.

MigrationCommandEventData

The DiagnosticSource event payload for RelationalEventId events of a specific migration.

MigrationEventData

The DiagnosticSource event payload for RelationalEventId events of a specific migration.

MigrationScriptingEventData

The DiagnosticSource event payload for RelationalEventId migration scripting events.

MigrationTypeEventData

The DiagnosticSource event payload for RelationalEventId migration events.

MigratorConnectionEventData

The DiagnosticSource event payload for RelationalEventId migration connection events.

MigratorEventData

The DiagnosticSource event payload for RelationalEventId migration events.

MinBatchSizeEventData

The DiagnosticSource event payload for RelationalEventId min batch size events.

NavigationBaseEventData

A DiagnosticSource event payload class for events that have an INavigationBase.

NavigationEventData

A DiagnosticSource event payload class for events that have an INavigation.

NavigationPathEventData

A DiagnosticSource event payload class for events that have a navigation property.

PropertyChangedEventData

A DiagnosticSource event payload class for events that indicate a changed property value.

PropertyEventData

A DiagnosticSource event payload class for events that have a property.

PropertyValueEventData

A DiagnosticSource event payload class for events that indicate a property value.

QueryExpressionEventData

A DiagnosticSource event payload class for events that have a query expression.

QueryModelClientEvalEventData

A DiagnosticSource event payload class for events that have a query model and an expression.

QueryModelEventData

A DiagnosticSource event payload class for events that have a query model.

ReferenceChangedEventData

A DiagnosticSource event payload class for events that indicate a changed property value.

RelationalConcurrencyExceptionEventData

A DiagnosticSource event payload used when a DbUpdateConcurrencyException is being thrown from a relational database provider.

RelationalEventId

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

RelationalLoggerExtensions

This class contains static methods used by EF Core internals and relational database providers to write information to an ILogger and a DiagnosticListener for well-known events.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

RelationalLoggingDefinitions

Contains placeholders for caching of EventDefinitionBase.

This class is public so that it can be inherited by database providers to add caching for their events. It should not be used for any other purpose.

RelationalStrings

String resources used in EF exceptions, etc.

These strings are exposed publicly for use by database providers and extensions. It is unusual for application code to need these strings.

SaveChangesCompletedEventData

A DiagnosticSource event payload class for events that indicate SaveChanges() has completed.

SaveChangesEventData

A DiagnosticSource event payload class for events that specify the entities being saved and the rows affected.

SaveChangesInterceptor

Abstract base class for ISaveChangesInterceptor for use when implementing a subset of the interface methods.

SequenceEventData

The DiagnosticSource event payload base class for events that reference a sequence.

ServiceProviderDebugInfoEventData

A DiagnosticSource event payload class for events that reference debug information on service provider creation.

ServiceProviderEventData

A DiagnosticSource event payload class for events that reference a IServiceProvider container.

ServiceProvidersEventData

A DiagnosticSource event payload class for events that reference multiple IServiceProvider containers.

SharedDependentEntityEventData

A DiagnosticSource event payload class for events that reference two IEntityType instances.

SkipCollectionChangedEventData

A DiagnosticSource event payload class for events that indicate a skip collection navigation property has had entities added and/or removed.

SkipNavigationEventData

A DiagnosticSource event payload class for events that have an ISkipNavigation.

SqliteEventId

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

SqlServerEventId

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

StateChangedEventData

A DiagnosticSource event payload class for events that indicate a change of a tracked entity from one EntityState to another.

StoredProcedurePropertyEventData

A DiagnosticSource event payload class for events that have involving mapping of a property to a stored procedure.

TransactionEndEventData

The DiagnosticSource event payload base class for RelationalEventId transaction end events.

TransactionEnlistedEventData

The DiagnosticSource event payload for RelationalEventId transaction enlisted events.

TransactionErrorEventData

The DiagnosticSource event payload base class for RelationalEventId transaction error events.

TransactionEventData

The DiagnosticSource event payload base class for RelationalEventId transaction events.

TransactionStartingEventData

The DiagnosticSource event payload base class for RelationalEventId transaction events.

TwoPropertyBaseCollectionsEventData

A DiagnosticSource event payload class for events that have two property collections.

TwoSqlExpressionsEventData

The DiagnosticSource event payload base class for events that references two SqlExpression.

TwoUnmappedPropertyCollectionsEventData

A DiagnosticSource event payload class for events that have two unmapped property collections.

TypeEventData

A DiagnosticSource event payload class for events that reference a Type.

TypeLoadingEventData

A DiagnosticSource event payload class for type loading errors.

UniquifiedPropertyEventData

A DiagnosticSource event payload class for events that have a property that has been uniquified.

UpdateEntryEventData

A DiagnosticSource event payload class for events that have an entity update entry.

UpdatingIdentityResolutionInterceptor

A IIdentityResolutionInterceptor that copies property values from the new entity instance into the tracked entity instance.

ValueConverterEventData

A DiagnosticSource event payload class for events that have a ValueConverter.

WarningsConfiguration

Represents configuration for which warnings should be thrown, logged, or ignored. by database providers or extensions. These options are set using WarningsConfigurationBuilder.

WarningsConfigurationBuilder

Configures the runtime behavior of events generated by Entity Framework. You can set a default behavior and behaviors for each event ID.

This class is used within the ConfigureWarnings(Action<WarningsConfigurationBuilder>) API and it is not designed to be directly constructed in your application code.

Structs

IdentityResolutionInterceptionData

A parameter object passed to IIdentityResolutionInterceptor methods.

InstantiationBindingInterceptionData

A parameter object passed to IInstantiationBindingInterceptor methods.

InterceptionResult

Represents a result from an IInterceptor such as an ISaveChangesInterceptor to allow suppression of the normal operation being intercepted.

InterceptionResult<TResult>

Represents a result from an IInterceptor such as an ISaveChangesInterceptor to allow suppression of the normal operation being intercepted.

MaterializationInterceptionData

A parameter object passed to IMaterializationInterceptor methods containing data about the instance being materialized.

Interfaces

ICollectionChangedEventData

An interface implemented by any EventData subclass that represents a change to either a skip collection navigation or a regular collection navigation.

IDbCommandInterceptor

Allows interception of commands sent to a relational database.

IDbConnectionInterceptor

Allows interception of operations on DbConnection.

IDbContextLogger

A simple logging interface for Entity Framework events. Used by LogTo(Action<String>, LogLevel, Nullable<DbContextLoggerOptions>)

IDbTransactionInterceptor

Allows interception of operations related to a DbTransaction.

IDiagnosticsLogger

Combines ILogger and DiagnosticSource for use by all EF Core logging so that events can be sent to both ILogger for ASP.NET and DiagnosticSource for everything else.

IDiagnosticsLogger<TLoggerCategory>

Combines ILogger and DiagnosticSource for use by all EF Core logging so that events can be sent to both ILogger for ASP.NET and DiagnosticSource for everything else.

IErrorEventData

An interface implemented by any EventData subclass that represents an error event with an Exception.

IIdentityResolutionInterceptor

Allows interception of identity resolution conflicts when the DbContext starts tracking new entity instances.

IInstantiationBindingInterceptor

A ISingletonInterceptor used to modify the InstantiationBinding used when creating entity instances.

IInterceptor

The base interface for all Entity Framework interceptors.

IInterceptorAggregator

A service to resolve a single IInterceptor from all those registered on the DbContext or in the internal service provider.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

IInterceptors

A service that resolves a single IInterceptor from all those registered on the DbContext or in the internal service provider.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

ILoggingOptions

Options set at the IServiceProvider singleton level to control how messages are logged and/or thrown in exceptions.

IMaterializationInterceptor

A ISingletonInterceptor used to intercept the various parts of object creation and initialization when Entity Framework is creating an object, typically from data returned by a query.

INavigationBaseEventData

A common interface for event payload classes that have an INavigationBase.

IQueryExpressionInterceptor

Allows interception of query expression trees and resulting compiled delegates.

IRelationalCommandDiagnosticsLogger

An IDiagnosticsLogger<TLoggerCategory> with some extra functionality suited for high-performance logging.

IRelationalConnectionDiagnosticsLogger

An IDiagnosticsLogger<TLoggerCategory> with some extra functionality suited for high-performance logging.

ISaveChangesInterceptor

Allows interception of the DbContext.SaveChanges and DbContext.SaveChangesAync methods.

ISingletonInterceptor

The base interface for all Entity Framework interceptors that are registered as Singleton services. This means a single instance is used by many DbContext instances. The implementation must be thread-safe.

Enums

CommandSource

Enum used by CommandEventData, and subclasses to indicate the source of the DbCommand being used to execute the command.

DbCommandMethod

Enum used by CommandEventData, an subclasses to indicate the method on DbCommand being used to execute the command.

DbContextLoggerOptions

Formatting options for use with Microsoft.EntityFrameworkCore.Diagnostics.Internal.FormattingDbContextLogger and LogTo(Action<String>, LogLevel, Nullable<DbContextLoggerOptions>).