Delen via


Microsoft.EntityFrameworkCore.Storage Namespace

Classes

BoolTypeMapping

Represents the mapping between a .NET Boolean type and a database type.

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

ByteArrayRelationalTypeMapper

Determines the type mapping to use for byte array properties.

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

ByteArrayTypeMapping

Represents the mapping between a .NET Byte array type and a database type.

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

ByteTypeMapping

Represents the mapping between a .NET Byte type and a database type.

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

CharTypeMapping

Represents the mapping between a .NET Char type and a database type.

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

CoreTypeMapper

A simple default implementation of ITypeMapper

CoreTypeMapperDependencies

Service dependencies parameter class for CoreTypeMapper

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

Do not construct instances of this class directly from either provider or application code as the constructor signature may change as new dependencies are added. Instead, use this type in your constructor so that an instance will be created and injected automatically by the dependency injection container. To create an instance with some dependent services replaced, first resolve the object from the dependency injection container, then replace selected services using the 'With...' methods. Do not call the constructor at any point in this process.

CoreTypeMapping

Represents the mapping between a .NET type and a database type.

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

Database

The main interaction point between a context and the database provider.

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

DatabaseDependencies

Service dependencies parameter class for Database

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

DatabaseErrorLogState

Provided as the state to ILogger when logging an exception that occurred while accessing the database.

DatabaseProvider<TOptionsExtension>

The primary point where a database provider can tell EF that it has been selected for the current context.

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

DatabaseProvider<TProviderServices,TOptionsExtension>

The primary point where a database provider can tell EF that it has been selected for the current context and provide the services required for it to function.

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

DatabaseProviderDependencies

Service dependencies parameter class for DatabaseProvider<TOptionsExtension>

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

DatabaseProviderServices

The base set of services required by EF for a database provider to function.

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

DateOnlyTypeMapping

Represents the mapping between a .NET DateOnly type and a database type.

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

DateTimeOffsetTypeMapping

Represents the mapping between a .NET DateTimeOffset type and a database type.

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

DateTimeTypeMapping

Represents the mapping between a .NET DateTime type and a database type.

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

DbCommandLogData

Logging information about a DbCommand that is being executed.

Instances of this class are typically created by Entity Framework and passed to loggers, it is not designed to be directly constructed in your application code.

DbContextTransactionExtensions

Extension methods for IDbContextTransaction.

DbParameterLogData

Logging information about the parameters of a DbCommand that is being executed.

Instances of this class are typically created by Entity Framework and passed to loggers, it is not designed to be directly constructed in your application code.

DecimalTypeMapping

Represents the mapping between a .NET Decimal type and a database type.

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

DoubleTypeMapping

Represents the mapping between a .NET Double type and a database type.

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

ExecutionResult<TResult>

Represents the execution state of an operation.

ExecutionStrategy

The base class for IExecutionStrategy implementations.

ExecutionStrategyContext

A class that provides dependencies for ExecutionStrategy

ExecutionStrategyDependencies

Service dependencies parameter class for IExecutionStrategy

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

FloatTypeMapping

Represents the mapping between a .NET Single type and a database type.

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

GuidTypeMapping

Represents the mapping between a .NET Guid type and a database type.

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

InMemoryDatabaseRoot

Acts as a root for all in-memory databases such that they will be available across context instances and service providers as long as the same instance of this type is passed to UseInMemoryDatabase<TContext>(DbContextOptionsBuilder<TContext>, String, Action<InMemoryDbContextOptionsBuilder>)

IntTypeMapping

Represents the mapping between a .NET Int32 type and a database type.

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

JsonTypeMapping

Represents the mapping between a JsonElement type and a database type.

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

LongTypeMapping

Represents the mapping between a .NET Int64 type and a database type.

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

NonRetryingExecutionStrategy

An implementation of IExecutionStrategy that does no retries.

ParameterNameGenerator

Generates unique names for parameters.

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

ParameterNameGeneratorDependencies

Service dependencies parameter class for ParameterNameGeneratorFactory

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

ParameterNameGeneratorFactory

Creates instances of the ParameterNameGenerator type.

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

RawSqlCommand

Represents a raw SQL command to be executed against a relational database.

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

ReaderColumn

An expected column in the relational data reader.

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

ReaderColumn<T>

An expected column in the relational data reader.

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

RelationalCommand

A command to be executed against a relational database.

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

RelationalCommandBuilder

Builds a command to be executed against a relational database.

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

RelationalCommandBuilderDependencies

Service dependencies parameter class for RelationalCommandBuilder

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

RelationalCommandBuilderExtensions

Extension methods for the IRelationalCommandBuilder class.

RelationalCommandBuilderFactory

Factory for RelationalCommandBuilder instances.

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

RelationalCommandExtensions

Extension methods typically used by internal code and database providers to execute commands on the low-level IRelationalCommand abstraction.

RelationalConnection

Represents a connection with a relational database.

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

RelationalConnectionDependencies

Service dependencies parameter class for RelationalConnection

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

RelationalDatabase

The main interaction point between a context and the database provider.

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

RelationalDatabaseCreator

Performs database/schema creation, and other related operations.

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

RelationalDatabaseCreatorDependencies

Service dependencies parameter class for RelationalDatabaseCreator

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

RelationalDatabaseDependencies

Service dependencies parameter class for RelationalDatabase

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

RelationalDatabaseProviderServices

The primary services needed to interact with a relational database.

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

RelationalDataReader

Reads result sets from a relational database.

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

RelationalExecutionStrategyExtensions

Extension methods for IExecutionStrategy that can only be used with a relational database provider.

RelationalExecutionStrategyFactory

Factory for creating IExecutionStrategy instances for use with relational database providers.

RelationalGeometryTypeMapping<TGeometry,TProvider>

Base class for relation type mappings to NTS Geometry and derived types.

RelationalSqlGenerationHelper

Provides services to help with generation of SQL commands.

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

RelationalSqlGenerationHelperDependencies

Service dependencies parameter class for RelationalSqlGenerationHelper

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

RelationalTransaction

A transaction against the database.

RelationalTransactionFactory

A factory for creating RelationalTransaction instances.

This type is typically used by database providers. It is generally not used in application code.

RelationalTransactionFactoryDependencies

Service dependencies parameter class for RelationalTransactionFactory.

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

RelationalTypeMapper

Maps .NET types to their corresponding relational database types.

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

RelationalTypeMapperDependencies

Service dependencies parameter class for RelationalTypeMapper

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

Do not construct instances of this class directly from either provider or application code as the constructor signature may change as new dependencies are added. Instead, use this type in your constructor so that an instance will be created and injected automatically by the dependency injection container. To create an instance with some dependent services replaced, first resolve the object from the dependency injection container, then replace selected services using the 'With...' methods. Do not call the constructor at any point in this process.

RelationalTypeMapperExtensions

Extension methods for the IRelationalTypeMapper class.

RelationalTypeMapping

Represents the mapping between a .NET type and a database type.

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

RelationalTypeMappingSource

The base class for relational type mapping source. Relational providers should derive from this class and override Microsoft.EntityFrameworkCore.Storage.RelationalTypeMappingSource.FindMapping(Microsoft.EntityFrameworkCore.Storage.RelationalTypeMappingInfo@)

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

RelationalTypeMappingSourceDependencies

Service dependencies parameter class for RelationalTypeMappingSource

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

RelationalTypeMappingSourceExtensions

Extension methods for the IRelationalTypeMappingSource class.

RelationalValueBufferFactoryDependencies

Service dependencies parameter class for Microsoft.EntityFrameworkCore.Storage.Internal.TypedRelationalValueBufferFactory.

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

Do not construct instances of this class directly from either provider or application code as the constructor signature may change as new dependencies are added. Instead, use this type in your constructor so that an instance will be created and injected automatically by the dependency injection container. To create an instance with some dependent services replaced, first resolve the object from the dependency injection container, then replace selected services using the 'With...' methods. Do not call the constructor at any point in this process.

The service lifetime is Singleton. This means a single instance of each service is used by many DbContext instances. The implementation must be thread-safe. This service cannot depend on services registered as Scoped.

RetryLimitExceededException

The exception that is thrown when the action failed more times than the configured limit.

SByteTypeMapping

Represents the mapping between a .NET SByte type and a database type.

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

ShortTypeMapping

Represents the mapping between a .NET Int16 type and a database type.

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

StringRelationalTypeMapper

Maps string property types to their corresponding relational database types.

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

StringTypeMapping

Represents the mapping between a .NET String type and a database type.

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

TimeOnlyTypeMapping

Represents the mapping between a .NET TimeOnly type and a database type.

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

TimeSpanTypeMapping

Represents the mapping between a .NET TimeSpan type and a database type.

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

TypedRelationalValueBufferFactoryFactory

Creates instances of the IRelationalValueBufferFactory type. IRelationalValueBufferFactory instances are tied to a specific result shape. This factory is responsible for creating the IRelationalValueBufferFactory for a given result shape.

This factory results in value buffers that use they strongly typed APIs to read back individual values from the underlying DbDataReader.

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

The service lifetime is Singleton. This means a single instance is used by many DbContext instances. The implementation must be thread-safe. This service cannot depend on services registered as Scoped.

TypeMappingSource

The base class for non-relational type mapping. Non-relational providers should derive from this class and override TypeMappingSourceBase.FindMapping

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

TypeMappingSourceBase

The base class for non-relational type mapping source. Non-relational providers should derive from this class and override TypeMappingSourceBase.FindMapping

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

TypeMappingSourceDependencies

Service dependencies parameter class for TypeMappingSourceBase

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

TypeMaterializationInfo

Associates a RelationalTypeMapping with an optional IProperty and an index into the data reader for use when reading and converting values from the database.

UIntTypeMapping

Represents the mapping between a .NET UInt32 type and a database type.

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

ULongTypeMapping

Represents the mapping between a .NET UInt64 type and a database type.

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

UntypedRelationalValueBufferFactoryFactory

Creates instances of the IRelationalValueBufferFactory type. IRelationalValueBufferFactory instances are tied to a specific result shape. This factory is responsible for creating the IRelationalValueBufferFactory for a given result shape.

This factory results in value buffers that use the untyped GetValues(Object[]) API to read back individual values from the underlying DbDataReader.

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

UShortTypeMapping

Represents the mapping between a .NET UInt16 type and a database type.

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

Structs

CoreTypeMapping.CoreTypeMappingParameters

Parameter object for use in the CoreTypeMapping hierarchy.

MaterializationContext

Parameter object containing context needed for materialization of an entity.

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

RelationalCommandParameterObject

A parameter object for the execution methods on RelationalCommand.

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

RelationalTypeMapping.RelationalTypeMappingParameters

Parameter object for use in the RelationalTypeMapping hierarchy.

RelationalTypeMappingInfo

Describes metadata needed to decide on a relational type mapping for a property, type, or provider-specific relational type name.

TypeMappingInfo

Describes metadata needed to decide on a type mapping for a property or type.

ValueBuffer

Represents a set of indexed values. Typically used to represent a row of data returned from a database.

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

Interfaces

IByteArrayRelationalTypeMapper

Determines the type mapping to use for byte array properties.

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

IDatabase

The main interaction point between a context and the database provider.

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

IDatabaseCreator

Creates and deletes databases for a given database provider.

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

IDatabaseCreatorWithCanConnect

Extends IDatabaseCreator to add CanConnect() methods. This interface will be merged with IDatabaseCreator in EF Core 3.0.

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

IDatabaseFacadeDependencies

Exposes dependencies needed by DatabaseFacade.

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

IDatabaseFacadeDependenciesAccessor

Provides access to IDatabaseFacadeDependencies for providers and extensions.

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

IDatabaseProvider

The primary point where a database provider can tell EF that it has been selected for the current context and provide the services required for it to function.

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

IDatabaseProviderServices

The base set of services required by EF for a database provider to function.

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

IDbContextTransaction

A transaction against the database.

IDbContextTransactionManager

Creates and manages the current transaction.

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

IExceptionDetector

Used by EF internal code and database providers to detect various types of exceptions.

IExecutionStrategy

A strategy that is used to execute a command or query against the database, possibly with logic to retry when a failure occurs.

IExecutionStrategyFactory

Factory for IExecutionStrategy instances.

IParameterNameGeneratorFactory

Creates instances of ParameterNameGenerator.

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

IRawSqlCommandBuilder

Creates commands based on raw SQL command text.

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

IRelationalCommand

A command to be executed against a relational database.

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

IRelationalCommandBuilder

Builds a command to be executed against a relational database.

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

IRelationalCommandBuilderFactory

Creates instances of the IRelationalCommandBuilder class.

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

IRelationalCommandTemplate

A command template to populate an IRelationalCommand or create a DbCommand

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

IRelationalConnection

Represents a connection with a relational database.

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

IRelationalDatabaseCreator

Performs database/schema creation, and other related operations.

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

IRelationalDatabaseFacadeDependencies

Exposes dependencies needed by DatabaseFacade and its relational extension methods.

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

IRelationalDatabaseProviderServices

The primary services needed to interact with a relational database.

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

IRelationalParameter

A parameter in an IRelationalCommand. Note that this interface just represents a placeholder for a parameter and not the actual value. This is because the same command can be reused multiple times with different parameter values.

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

IRelationalParameterBuilder

Builds a collection of IRelationalParameter.

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

IRelationalTransactionFactory

A factory for creating RelationalTransaction instances.

This type is typically used by database providers It is generally not used in application code.

IRelationalTransactionManager

Creates and manages the current transaction for a relational database.

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

IRelationalTypeMapper

Maps .NET types to their corresponding relational database types.

Note: Use IRelationalTypeMappingSource going forward.

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

IRelationalTypeMappingSource

The relational type mapping source. Type mappings describe how a provider maps CLR types/values to database types/values.

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

Warning: do not implement this interface directly. Instead, derive from RelationalTypeMappingSource.

IRelationalTypeMappingSourcePlugin

Represents a plugin relational type mapping source.

IRelationalValueBufferFactory

Creates instances of the ValueBuffer type. An IRelationalValueBufferFactory is tied to a particular result shape and will only create value buffers for that result shape. Instances for different result shapes are created by IRelationalValueBufferFactoryFactory.

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

IRelationalValueBufferFactoryFactory

Creates instances of the IRelationalValueBufferFactory type. IRelationalValueBufferFactory instances are tied to a specific result shape. This factory is responsible for creating the IRelationalValueBufferFactory for a given result shape.

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

The service lifetime is Singleton. This means a single instance is used by many DbContext instances. The implementation must be thread-safe. This service cannot depend on services registered as Scoped.

ISqlGenerationHelper

Provides services to help with generation of SQL commands.

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

IStringRelationalTypeMapper

Maps string property types to their corresponding relational database types.

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

ITransactionEnlistmentManager

Manages the current Transaction.

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

ITypeMapper

Maps .NET types to their corresponding provider database types.

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

ITypeMappingSource

The core type mapping source. Type mappings describe how a provider maps CLR types/values to database types/values.

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

Warning: do not implement this interface directly. Instead, derive from TypeMappingSourceBase for non-relational providers, or 'RelationalTypeMappingSource' for relational providers.

ITypeMappingSourcePlugin

Represents a plugin type mapping source.

Enums

StoreTypePostfix

Indicates which values should be appended to the store type name.