ITypeMappingSource.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(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 Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping? FindMapping (Microsoft.EntityFrameworkCore.Metadata.IElementType elementType);
abstract member FindMapping : Microsoft.EntityFrameworkCore.Metadata.IElementType -> Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping
Public Function FindMapping (elementType As IElementType) As CoreTypeMapping

Parameters

elementType
IElementType

The collection element.

Returns

The type mapping, or null if none was found.

Applies to

FindMapping(IProperty)

Finds the type mapping for a given IProperty.

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

Parameters

property
IProperty

The property.

Returns

The type mapping, or null if none was found.

Applies to

FindMapping(MemberInfo)

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

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

Parameters

member
MemberInfo

The field or property.

Returns

The type mapping, or null if none was found.

Remarks

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

Applies to

FindMapping(Type)

Finds the type mapping for a given Type.

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

Parameters

type
Type

The CLR type.

Returns

The type mapping, or null if none was found.

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 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 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.

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 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 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.

Remarks

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

Applies to