Share via


TypeMappingSourceBase.FindMapping Method

Definition

Overloads

FindMapping(IElementType)

Finds the type mapping for a given IElementType.

FindMapping(IProperty)

Finds the type mapping for a given IProperty.

FindMapping(TypeMappingInfo)

Overridden by database providers to find a type mapping for the given info.

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, CoreTypeMapping)

Finds the type mapping for a given Type, taking pre-convention configuration into the account.

FindMapping(IElementType)

Finds the type mapping for a given IElementType.

public abstract Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping? FindMapping (Microsoft.EntityFrameworkCore.Metadata.IElementType elementType);
abstract member FindMapping : Microsoft.EntityFrameworkCore.Metadata.IElementType -> Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping
Public MustOverride Function FindMapping (elementType As IElementType) As CoreTypeMapping

Parameters

elementType
IElementType

The collection element.

Returns

The type mapping, or null if none was found.

Implements

Applies to

FindMapping(IProperty)

Finds the type mapping for a given IProperty.

public abstract Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping FindMapping (Microsoft.EntityFrameworkCore.Metadata.IProperty property);
public abstract Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping? FindMapping (Microsoft.EntityFrameworkCore.Metadata.IProperty property);
abstract member FindMapping : Microsoft.EntityFrameworkCore.Metadata.IProperty -> Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping
Public MustOverride Function FindMapping (property As IProperty) As CoreTypeMapping

Parameters

property
IProperty

The property.

Returns

The type mapping, or null if none was found.

Implements

Remarks

Note: providers should typically not need to override this method.

Applies to

FindMapping(TypeMappingInfo)

Overridden by database providers to find a type mapping for the given info.

protected abstract Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping FindMapping (in Microsoft.EntityFrameworkCore.Storage.TypeMappingInfo mappingInfo);
protected virtual Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping FindMapping (in Microsoft.EntityFrameworkCore.Storage.TypeMappingInfo mappingInfo);
protected virtual Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping? FindMapping (in Microsoft.EntityFrameworkCore.Storage.TypeMappingInfo? mappingInfo);
abstract member FindMapping : TypeMappingInfo -> Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping
abstract member FindMapping : TypeMappingInfo -> Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping
override this.FindMapping : TypeMappingInfo -> Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping
Protected MustOverride Function FindMapping (mappingInfo As TypeMappingInfo) As CoreTypeMapping
Protected Overridable Function FindMapping (mappingInfo As TypeMappingInfo) As CoreTypeMapping

Parameters

mappingInfo
TypeMappingInfo

The mapping info to use to create the mapping.

Returns

The type mapping, or null if none could be found.

Remarks

The mapping info is populated with as much information about the required type mapping as is available. Use all the information necessary to create the best mapping. Return null if no mapping is available.

Applies to

FindMapping(MemberInfo)

Finds the type mapping for a given MemberInfo representing a field or a property of a CLR type.

public abstract Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping FindMapping (System.Reflection.MemberInfo member);
public abstract Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping? FindMapping (System.Reflection.MemberInfo member);
abstract member FindMapping : System.Reflection.MemberInfo -> Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping
Public MustOverride Function FindMapping (member As MemberInfo) As CoreTypeMapping

Parameters

member
MemberInfo

The field or property.

Returns

The type mapping, or null if none was found.

Implements

Remarks

Note: Only call this method if there is no IProperty available, otherwise call FindMapping(IProperty)

Note: providers should typically not need to override this method.

Applies to

FindMapping(Type)

Finds the type mapping for a given Type.

public abstract Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping FindMapping (Type type);
public abstract Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping? FindMapping (Type type);
abstract member FindMapping : Type -> Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping
Public MustOverride Function FindMapping (type As Type) As CoreTypeMapping

Parameters

type
Type

The CLR type.

Returns

The type mapping, or null if none was found.

Implements

Remarks

Note: Only call this method if there is no IProperty or IModel available, otherwise call FindMapping(IProperty) or FindMapping(Type, IModel, CoreTypeMapping)

Applies to

FindMapping(Type, IModel)

Finds the type mapping for a given Type, taking pre-convention configuration into the account.

public abstract Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping? FindMapping (Type type, Microsoft.EntityFrameworkCore.Metadata.IModel model);
abstract member FindMapping : Type * Microsoft.EntityFrameworkCore.Metadata.IModel -> Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping
Public MustOverride Function FindMapping (type As Type, model As IModel) As CoreTypeMapping

Parameters

type
Type

The CLR type.

model
IModel

The model.

Returns

The type mapping, or null if none was found.

Implements

Remarks

Note: Only call this method if there is no IProperty, otherwise call FindMapping(IProperty).

Applies to

FindMapping(Type, IModel, CoreTypeMapping)

Finds the type mapping for a given Type, taking pre-convention configuration into the account.

public abstract Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping? FindMapping (Type type, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping? elementMapping = default);
abstract member FindMapping : Type * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping -> Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping
Public MustOverride Function FindMapping (type As Type, model As IModel, Optional elementMapping As CoreTypeMapping = Nothing) As CoreTypeMapping

Parameters

type
Type

The CLR type.

model
IModel

The model.

elementMapping
CoreTypeMapping

The element mapping to use, if known.

Returns

The type mapping, or null if none was found.

Implements

Remarks

Note: Only call this method if there is no IProperty, otherwise call FindMapping(IProperty).

Applies to