Table of Contents

Namespace Microsoft.EntityFrameworkCore.Infrastructure

Classes

AccessorExtensions

Extension methods for IInfrastructure<T>.

These methods are typically used by database providers (and other extensions). They are generally not used in application code.

Annotatable

Base class for types that support reading and writing annotations.

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

AnnotatableBase

Base class for types that support reading and writing annotations.

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

AnnotatableBuilder<TMetadata, TModelBuilder>

A base type with a simple API surface for configuring a ConventionAnnotatable.

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

Annotation

An arbitrary piece of metadata that can be stored on an object that implements IReadOnlyAnnotatable.

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

ConventionAnnotatable

Base class for types that support reading and writing convention annotations.

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

CoreOptionsExtension

Represents options managed by the core of Entity Framework, as opposed to those managed by database providers or extensions. These options are set using DbContextOptionsBuilder.

Instances of this class are designed to be immutable. To change an option, call one of the 'With...' methods to obtain a new instance with the option changed.

DatabaseFacade

Provides access to database related information and operations for a context. Instances of this class are typically obtained from Database and it is not designed to be directly constructed in your application code.

DbContextAttribute

Identifies the DbContext that a class belongs to. For example, this attribute is used to identify which context a migration applies to.

DbContextOptionsExtensionInfo

Information/metadata for an IDbContextOptionsExtension.

DebugView

A placeholder for lazily-generated debug strings that can be expanded in the debugger to to generate and display them.

EntityFrameworkEventSource

An EventSource emitting Entity Framework performance counter data.

EntityFrameworkInternalAttribute

Marks an API as internal to Entity Framework Core. These APIs are not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use such APIs directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

EntityFrameworkServicesBuilder

A builder API designed for database providers to use when registering services.

ExpressionExtensions

Extension methods for Expression types.

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

IndentedStringBuilder

A thin wrapper over StringBuilder that adds indentation to each line built.

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

MethodInfoExtensions

Extension methods for MethodInfo.

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

ModelCacheKey

A key that uniquely identifies the model for a given context. This is used to store and lookup a cached model for a given context. This default implementation uses the context type as they key, thus assuming that all contexts of a given type have the same model.

ModelCacheKeyFactory

Creates keys that uniquely identifies the model for a given context. This is used to store and lookup a cached model for a given context. This default implementation uses the context type as they key, thus assuming that all contexts of a given type have the same model.

ModelCacheKeyFactoryDependencies

Service dependencies parameter class for ModelCacheKeyFactory

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

ModelCustomizer

Builds the model for a given context. This implementation builds the model by calling OnModelCreating(ModelBuilder) on the context.

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

ModelCustomizerDependencies

Service dependencies parameter class for ModelCustomizer

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

ModelDependencies

Service dependencies parameter class for IModel

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

ModelRuntimeInitializer

Initializes a IModel with the runtime dependencies.

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

ModelRuntimeInitializerDependencies

Service dependencies parameter class for ModelRuntimeInitializer

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

ModelSource

An implementation of IModelSource that produces a model based on the DbSet<TEntity> properties exposed on the context. The model is cached to avoid recreating it every time it is requested.

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

ModelSourceDependencies

Service dependencies parameter class for ModelSource

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

ModelValidator

The validator that enforces core rules common for all providers.

ModelValidatorDependencies

Service dependencies parameter class for ModelValidator

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

PooledDbContextFactory<TContext>

A factory returning pooled DbContext instances. Disposing the instance returned by this factory returns them to the internal pooling mechanism.

ProductInfo

Helper class for finding the version of Entity Framework Core being used.

RuntimeModelDependencies

Service dependencies parameter class for IReadOnlyModel

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

ServiceCollectionMap

Provides a map over a IServiceCollection that allows ServiceDescriptor entries to be conditionally added or re-written without requiring linear scans of the service collection each time this is done.

ServiceProviderAccessor

This type is added as a singleton service to the application service provider to provide access to the root service provider.

TypeExtensions

Extension methods for Type instances.

These extensions are typically used by database providers (and other extensions). They are generally not used in application code.

Uniquifier

Provides methods for manipulating string identifiers.

Structs

ConcurrencyDetectorCriticalSectionDisposer

A IDisposable returned by an IConcurrencyDetector, which will exit the ongoing critical section when disposed.

DbSetProperty

A struct representing facets of DbSet<TEntity> property defined on DbContext derived type.

ServiceCharacteristics

Characteristics of a given EF service.

Interfaces

IAnnotatable

A class that exposes build-time and run-time annotations. Annotations allow for arbitrary metadata to be stored on an object.

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

IAnnotation

An arbitrary piece of metadata that can be stored on an object that implements IReadOnlyAnnotatable.

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

IConcurrencyDetector

Used by EF internal code and database providers to detect concurrent access to non-thread-safe resources.

ICoreSingletonOptions

Options set at the IServiceProvider singleton level to control core options.

ICurrentDbContext

Registered as a scoped service in Entity Framework's internal service provider to provide access to the current DbContext being used.

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

IDbContextOptions

The options to be used by a DbContext. You normally override OnConfiguring(DbContextOptionsBuilder) or use a DbContextOptionsBuilder to create instances of classes that implement this interface, they are not designed to be directly created in your application code.

IDbContextOptionsBuilderInfrastructure

Explicitly implemented by DbContextOptionsBuilder to hide methods that are used by database provider extension methods but not intended to be called by application developers.

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

IDbContextOptionsExtension

Interface for extensions that are stored in Extensions.

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

IDbSetFinder

A service for finding DbSet<TEntity> properties on a type that inherits from DbContext.

IInfrastructure<T>

This interface is explicitly implemented by type to hide properties that are not intended to be used in application code but can be used in extension methods written by database providers etc.

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

IInternalServiceCollectionMap

Exposes methods allowing providers to register EF service dependency objects on the internal service provider.

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

IModelCacheKeyFactory

Creates keys that uniquely identifies the model for a given context. This is used to store and lookup a cached model for a given context.

IModelCustomizer

Performs additional configuration of the model in addition to what is discovered by convention.

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

IModelRuntimeInitializer

Initializes a IModel with the runtime dependencies. This is typically implemented by database providers to ensure that any runtime dependencies specific to their database are used.

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

IModelSource

Produces an IModel based on a context. This is typically implemented by database providers to ensure that any conventions and validation specific to their database are used.

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

IModelValidator

Validates a model after it is built.

IReadOnlyAnnotatable

A class that supports annotations. Annotations allow for arbitrary metadata to be stored on an object.

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

IResettableService

This interface must be implemented by any service that needs to be reset between different uses of the same DbContext in different pools.

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

ISingletonOptions

Implemented by any class that represents options that can only be set at the IServiceProvider singleton level.

Enums

MetadataDebugStringOptions

Options to print debug string differently for metadata objects.