Share via


RelationalTypeMappingSourceExtensions.GetMapping Method

Definition

Overloads

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.

GetMapping(IRelationalTypeMappingSource, IProperty)

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

public static Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping GetMapping (this Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMappingSource typeMappingSource, Microsoft.EntityFrameworkCore.Metadata.IProperty property);
static member GetMapping : Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMappingSource * Microsoft.EntityFrameworkCore.Metadata.IProperty -> Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping
<Extension()>
Public Function GetMapping (typeMappingSource As IRelationalTypeMappingSource, property As IProperty) As RelationalTypeMapping

Parameters

typeMappingSource
IRelationalTypeMappingSource

The type mapping source.

property
IProperty

The property to get the mapping for.

Returns

The type mapping to be used.

Applies to

GetMapping(IRelationalTypeMappingSource, String)

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

public static Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping GetMapping (this Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMappingSource typeMappingSource, string typeName);
static member GetMapping : Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMappingSource * string -> Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping
<Extension()>
Public Function GetMapping (typeMappingSource As IRelationalTypeMappingSource, typeName As String) As RelationalTypeMapping

Parameters

typeMappingSource
IRelationalTypeMappingSource

The type mapping source.

typeName
String

The type to get the mapping for.

Returns

The type mapping to be used.

Remarks

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

Applies to

GetMapping(IRelationalTypeMappingSource, Type)

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

public static Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping GetMapping (this Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMappingSource typeMappingSource, Type clrType);
static member GetMapping : Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMappingSource * Type -> Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping
<Extension()>
Public Function GetMapping (typeMappingSource As IRelationalTypeMappingSource, clrType As Type) As RelationalTypeMapping

Parameters

typeMappingSource
IRelationalTypeMappingSource

The type mapping source.

clrType
Type

The type to get the mapping for.

Returns

The type mapping to be used.

Applies to

GetMapping(IRelationalTypeMappingSource, Type, IModel)

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

public static Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping GetMapping (this Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMappingSource typeMappingSource, Type clrType, Microsoft.EntityFrameworkCore.Metadata.IModel model);
static member GetMapping : Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMappingSource * Type * Microsoft.EntityFrameworkCore.Metadata.IModel -> Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping
<Extension()>
Public Function GetMapping (typeMappingSource As IRelationalTypeMappingSource, clrType As Type, model As IModel) As RelationalTypeMapping

Parameters

typeMappingSource
IRelationalTypeMappingSource

The type mapping source.

clrType
Type

The type to get the mapping for.

model
IModel

The model.

Returns

The type mapping to be used.

Applies to