TypeMappingSource 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 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.
public abstract class TypeMappingSource : Microsoft.EntityFrameworkCore.Storage.TypeMappingSourceBase
type TypeMappingSource = class
inherit TypeMappingSourceBase
Public MustInherit Class TypeMappingSource
Inherits TypeMappingSourceBase
- Inheritance
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
TypeMappingSource(TypeMappingSourceDependencies) |
Initializes a new instance of this class. |
Properties
Dependencies |
Dependencies for this service. (Inherited from TypeMappingSourceBase) |
Methods
FindCollectionMapping(TypeMappingInfo, Type, Type, CoreTypeMapping) |
Attempts to find a type mapping for a collection of primitive types. |
FindMapping(IElementType) |
Finds the type mapping for a 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(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(TypeMappingInfo) |
Overridden by database providers to find a type mapping for the given info. (Inherited from TypeMappingSourceBase) |
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) |
Applies to
Entity Framework