RelationalTypeMapper Class

Definition

Caution

Use RelationalTypeMappingSource.

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.

public abstract class RelationalTypeMapper : Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper
public abstract class RelationalTypeMapper : Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper, Microsoft.EntityFrameworkCore.Storage.ITypeMapper
[System.Obsolete("Use RelationalTypeMappingSource.")]
public abstract class RelationalTypeMapper : Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper, Microsoft.EntityFrameworkCore.Storage.ITypeMapper
type RelationalTypeMapper = class
    interface IRelationalTypeMapper
type RelationalTypeMapper = class
    interface IRelationalTypeMapper
    interface ITypeMapper
[<System.Obsolete("Use RelationalTypeMappingSource.")>]
type RelationalTypeMapper = class
    interface IRelationalTypeMapper
    interface ITypeMapper
Public MustInherit Class RelationalTypeMapper
Implements IRelationalTypeMapper
Public MustInherit Class RelationalTypeMapper
Implements IRelationalTypeMapper, ITypeMapper
Inheritance
RelationalTypeMapper
Attributes
Implements

Constructors

RelationalTypeMapper()
RelationalTypeMapper(RelationalTypeMapperDependencies)

Initializes a new instance of the this class.

Properties

ByteArrayMapper

Gets the mapper to be used for byte array properties.

StringMapper

Gets the mapper to be used for string properties.

Methods

CreateMappingFromStoreType(String)

Creates the mapping for the given database type.

FindCustomMapping(IProperty)

Gets the relational database type for the given property, using a separate type mapper if needed. This base implementation uses custom mappers for string and byte array properties. Returns null if no mapping is found.

FindMapping(IProperty)

Gets the relational database type for the given property. Returns null if no mapping is found.

FindMapping(String)

Gets the mapping that represents the given database type. Returns null if no mapping is found.

FindMapping(Type)

Gets the relational database type for a given .NET type. Returns null if no mapping is found.

GetByteArrayMapping(IProperty)

Gets the relational database type for the given byte array property.

GetClrTypeMappings()

Gets the mappings from .NET types to database types.

GetColumnType(IProperty)

Gets column type for the given property.

GetStoreTypeMappings()

Gets the mappings from database types to .NET types.

GetStringMapping(IProperty)

Gets the relational database type for the given string property.

IsTypeMapped(Type)

Gets a value indicating whether the given .NET type is mapped.

RequiresKeyMapping(IProperty)

Gets a value indicating whether the given property should use a database type that is suitable for key properties.

ValidateTypeName(String)

Ensures that the given type name is a valid type for the relational database. An exception is thrown if it is not a valid type.

Extension Methods

GetMapping(IRelationalTypeMapper, IProperty)
Obsolete.

Gets the relational database type for a given property, throwing if no mapping is found.

GetMapping(IRelationalTypeMapper, String)
Obsolete.

Gets the mapping that represents the given database type, throwing if no mapping is found.

Note that sometimes the same store type can have different mappings; this method returns the default.

GetMapping(IRelationalTypeMapper, Type)
Obsolete.

Gets the relational database type for a given .NET type, throwing if no mapping is found.

GetMappingForValue(IRelationalTypeMapper, Object)
Obsolete.

Gets the relational database type for a given object, throwing if no mapping is found.

IsTypeMapped(IRelationalTypeMapper, Type)

Gets a value indicating whether the given .NET type is mapped.

Applies to