RelationalTypeMappingSource Class
Definition
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.
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.
public abstract class RelationalTypeMappingSource : Microsoft.EntityFrameworkCore.Storage.TypeMappingSourceBase, Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMappingSource
type RelationalTypeMappingSource = class
inherit TypeMappingSourceBase
interface IRelationalTypeMappingSource
interface ITypeMappingSource
Public MustInherit Class RelationalTypeMappingSource
Inherits TypeMappingSourceBase
Implements IRelationalTypeMappingSource
- Inheritance
- Implements
Remarks
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.
See Implementation of database providers and extensions for more information and examples.
Constructors
RelationalTypeMappingSource(TypeMappingSourceDependencies, RelationalTypeMappingSourceDependencies) |
Initializes a new instance of this class. |
Properties
Dependencies |
Dependencies for this service. (Inherited from TypeMappingSourceBase) |
RelationalDependencies |
Relational provider-specific dependencies for this service. |
Methods
FindCollectionMapping(RelationalTypeMappingInfo, Type, Type, CoreTypeMapping) |
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. |
FindMapping(IElementType) |
Finds the type mapping for the given IElementType. |
FindMapping(IElementType) |
Finds the type mapping for a given IElementType. (Inherited from TypeMappingSourceBase) |
FindMapping(IProperty) |
Finds the type mapping for a given IProperty. |
FindMapping(MemberInfo) |
Finds the type mapping for a given MemberInfo representing a field or a property of a CLR type. |
FindMapping(RelationalTypeMappingInfo) |
Overridden by relational database providers to find a type mapping for the given info. |
FindMapping(String) |
Finds the type mapping for a given database type name. |
FindMapping(Type) |
Finds the type mapping for a given Type. |
FindMapping(Type, IModel) |
Finds the type mapping for a given Type, taking pre-convention configuration into the account. |
FindMapping(Type, IModel) |
Finds the type mapping for a given Type, taking pre-convention configuration into the account. (Inherited from TypeMappingSourceBase) |
FindMapping(Type, IModel, CoreTypeMapping) |
Finds the type mapping for a given Type, taking pre-convention configuration into the account. |
FindMapping(Type, IModel, CoreTypeMapping) |
Finds the type mapping for a given Type, taking pre-convention configuration into the account. (Inherited from TypeMappingSourceBase) |
FindMapping(Type, String, Boolean, Nullable<Boolean>, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Int32>, Nullable<Int32>) |
Finds the type mapping for a given Type and additional facets. |
FindMapping(TypeMappingInfo) |
Call Microsoft.EntityFrameworkCore.Storage.RelationalTypeMappingSource.FindMapping(Microsoft.EntityFrameworkCore.Storage.RelationalTypeMappingInfo@) instead |
FindMappingWithConversion(RelationalTypeMappingInfo, IReadOnlyList<IProperty>) |
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. |
ParseStoreTypeName(String, Nullable<Boolean>, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>) |
Parses a provider-specific store type name, extracting the standard facets (e.g. size, precision) and returns the base store type name (without any facets). |
TryFindJsonCollectionMapping(TypeMappingInfo, Type, Type, CoreTypeMapping, ValueComparer, JsonValueReaderWriter) |
Attempts to find a JSON-based type mapping for a collection of primitive types. (Inherited from TypeMappingSourceBase) |
ValidateMapping(CoreTypeMapping, IProperty) |
Called after a mapping has been found so that it can be validated for the given property. (Inherited from TypeMappingSourceBase) |
Explicit Interface Implementations
IRelationalTypeMappingSource.FindMapping(IProperty) |
Finds the type mapping for a given IProperty. |
IRelationalTypeMappingSource.FindMapping(MemberInfo) |
Finds the type mapping for a given MemberInfo representing a field or a property of a CLR type. |
IRelationalTypeMappingSource.FindMapping(Type) |
Finds the type mapping for a given Type. |
IRelationalTypeMappingSource.FindMapping(Type, IModel) |
Finds the type mapping for a given Type, taking pre-convention configuration into the account. |
Extension Methods
GetMapping(IRelationalTypeMappingSource, IProperty) |
Gets the relational database type for a given property, throwing if no mapping is found. |
GetMapping(IRelationalTypeMappingSource, String) |
Gets the mapping that represents the given database type, throwing if no mapping is found. |
GetMapping(IRelationalTypeMappingSource, Type) |
Gets the relational database type for a given .NET type, throwing if no mapping is found. |
GetMapping(IRelationalTypeMappingSource, Type, IModel) |
Gets the relational database type for a given .NET type, throwing if no mapping is found. |
GetMappingForValue(IRelationalTypeMappingSource, Object) |
Gets the relational database type for a given object, throwing if no mapping is found. |
GetMappingForValue(IRelationalTypeMappingSource, Object, IModel) |
Gets the relational database type for a given object, throwing if no mapping is found. |
Applies to
Entity Framework