Microsoft.EntityFrameworkCore.Infrastructure Namespace
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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. |
AnnotatableExtensions |
Extension methods for IReadOnlyAnnotatable. |
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. |
CosmosDbContextOptionsBuilder |
Allows Cosmos specific configuration to be performed on DbContextOptions. |
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. |
DbContextFactoryOptions |
Provides information about the environment an application is running in. |
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. |
DesignTimeProviderServicesAttribute |
Identifies where to find the design time services for a given database provider. This attribute should be present in the primary assembly of the database provider. This attribute is typically used by database providers (and other extensions). It is generally not used in application code. |
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. |
EntityFrameworkRelationalServicesBuilder |
A builder API designed for relational database providers to use when registering services. |
EntityFrameworkServiceCollectionExtensions |
Extension methods for setting up Entity Framework related services in an IServiceCollection. |
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. |
InMemoryDbContextOptionsBuilder |
Allows in-memory specific configuration to be performed on DbContextOptions. |
LazyLoaderExtensions |
Extension methods for the ILazyLoader service that make it more convenient to use from entity classes. |
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. |
ModelSnapshot |
Base class for the snapshot of the IModel state generated by Migrations. |
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. |
NavigationBaseExtensions |
Extension methods for INavigationBase. 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. |
RelationalDbContextOptionsBuilder<TBuilder,TExtension> |
Allows relational database specific configuration to be performed on DbContextOptions. |
RelationalModelCustomizer |
Builds the model for a given context. This type is typically used by database providers (and other extensions). It is generally not used in application code. |
RelationalModelDependencies |
The relational model service dependencies. This type is typically used by database providers (and other extensions). It is generally not used in application code. |
RelationalModelExtensions |
Relational-specific extension methods for IModel. |
RelationalModelRuntimeInitializer |
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. |
RelationalModelRuntimeInitializerDependencies |
Service dependencies parameter class for RelationalModelRuntimeInitializer This type is typically used by database providers (and other extensions). It is generally not used in application code. |
RelationalModelValidator |
The validator that enforces rules common for all relational providers. |
RelationalModelValidatorDependencies |
Service dependencies parameter class for RelationalModelValidator This type is typically used by database providers (and other extensions). It is generally not used in application code. |
RelationalOptionsExtension |
Represents options managed by the relational database providers. These options are set using DbContextOptionsBuilder. |
RelationalOptionsExtension.RelationalExtensionInfo |
Information/metadata for a RelationalOptionsExtension. |
RelationalPropertyExtensions |
Relational extension methods for IReadOnlyProperty. |
RelationalServiceCollectionExtensions |
Relational database specific extension methods for IServiceCollection. |
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. |
SensitiveDataLogger<T> |
A wrapping logger for which logging of sensitive data can be enabled or disabled. 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. |
SpatialiteLoader |
Finds and loads SpatiaLite. |
SqliteDbContextOptionsBuilder |
Allows SQLite specific configuration to be performed on DbContextOptions. |
SqlServerDbContextOptionsBuilder |
Allows SQL Server specific configuration to be performed on DbContextOptions. |
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. |
WarningsConfigurationBuilder |
Configures the runtime behavior of warnings generated by Entity Framework. You can set a default behavior and behaviors for each warning type. This class is used within the ConfigureWarnings(Action<WarningsConfigurationBuilder>) API and it is not designed to be directly constructed in your application code. |
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. |
EntityFrameworkServicesBuilder.ServiceCharacteristics |
This is an internal API that supports the Entity Framework Core infrastructure and 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 it 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. |
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. |
ICosmosDbContextOptionsBuilderInfrastructure |
Explicitly implemented by CosmosDbContextOptionsBuilder to hide methods that are used by database provider extension methods but not intended to be called by application developers. |
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. |
IDbContextFactory<TContext> |
A factory for creating derived DbContext instances. Implement this interface to enable design-time services for context types that do not have a public default constructor. At design-time, derived DbContext instances can be created in order to enable specific design-time experiences such as Migrations. Design-time services will automatically discover implementations of this interface that are in the same assembly as the derived context. |
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. |
IDbContextOptionsExtensionWithDebugInfo |
Extended interface for extensions that also allows for debugging info to be gathered. This interface will likely be merged into IDbContextOptionsExtension in EF Core 3.0. 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. |
IDesignTimeServices |
Enables configuring design-time services. Tools will automatically discover implementations of this interface that are in the startup assembly. |
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. |
IInMemoryDbContextOptionsBuilderInfrastructure |
Explicitly implemented by InMemoryDbContextOptionsBuilder to hide methods that are used by database provider extension methods but not intended to be called by application developers. |
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. |
ILazyLoader |
A service that can be injected into entities to give them the capability of loading navigation properties automatically the first time they are accessed. |
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. |
IRelationalDbContextOptionsBuilderInfrastructure |
Explicitly implemented by RelationalDbContextOptionsBuilder<TBuilder,TExtension> to hide methods that are used by database provider extension methods but not intended to be called by application developers. |
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. |
ISensitiveDataLogger |
An ILogger for which logging of sensitive data can be enabled or disabled. |
ISensitiveDataLogger<T> |
An ILogger<TCategoryName> for which logging of sensitive data can be enabled or disabled. |
ISingletonOptions |
Implemented by any class that represents options that can only be set at the IServiceProvider singleton level. |
Enums
CoreEventId |
Values that are used as the eventId when logging messages from the core Entity Framework components. |
DesignEventId | |
InMemoryEventId |
Values that are used as the eventId when logging messages from the in-memory database provider via ILogger. |
MetadataDebugStringOptions |
Options to print debug string differently for metadata objects. |
RelationalDesignEventId | |
RelationalEventId |
Values that are used as the eventId when logging messages from a relational database provider via ILogger. |
SqliteDesignEventId |
Values that are used as the eventId when logging messages from the SQLite Design Entity Framework Core components. |
SqlServerDesignEventId |
Values that are used as the eventId when logging messages from the SQL Server Design Entity Framework Core components. |
Entity Framework