IRelationalTypeMappingSource.FindMapping Method
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.
Overloads
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(String) |
Finds the type mapping for a given database type name. |
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(Type, String, Boolean, Nullable<Boolean>, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Int32>, Nullable<Int32>) |
Finds the type mapping for a given Type and additional facets. |
FindMapping(IProperty)
Finds the type mapping for a given IProperty.
public Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping FindMapping (Microsoft.EntityFrameworkCore.Metadata.IProperty property);
public Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping? FindMapping (Microsoft.EntityFrameworkCore.Metadata.IProperty property);
abstract member FindMapping : Microsoft.EntityFrameworkCore.Metadata.IProperty -> Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping
Public Function FindMapping (property As IProperty) As RelationalTypeMapping
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.RelationalTypeMapping FindMapping (System.Reflection.MemberInfo member);
public Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping? FindMapping (System.Reflection.MemberInfo member);
abstract member FindMapping : System.Reflection.MemberInfo -> Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping
Public Function FindMapping (member As MemberInfo) As RelationalTypeMapping
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(String)
Finds the type mapping for a given database type name.
public Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping FindMapping (string storeTypeName);
public Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping? FindMapping (string storeTypeName);
abstract member FindMapping : string -> Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping
Public Function FindMapping (storeTypeName As String) As RelationalTypeMapping
Parameters
- storeTypeName
- String
The database type name.
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.RelationalTypeMapping FindMapping (Type type);
public Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping? FindMapping (Type type);
abstract member FindMapping : Type -> Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping
Public Function FindMapping (type As Type) As RelationalTypeMapping
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.RelationalTypeMapping? FindMapping (Type type, Microsoft.EntityFrameworkCore.Metadata.IModel model);
abstract member FindMapping : Type * Microsoft.EntityFrameworkCore.Metadata.IModel -> Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping
Public Function FindMapping (type As Type, model As IModel) As RelationalTypeMapping
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.RelationalTypeMapping? 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.RelationalTypeMapping
Public Function FindMapping (type As Type, model As IModel, Optional elementMapping As CoreTypeMapping = Nothing) As RelationalTypeMapping
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
FindMapping(Type, String, Boolean, Nullable<Boolean>, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Int32>, Nullable<Int32>)
Finds the type mapping for a given Type and additional facets.
public Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping FindMapping (Type type, string storeTypeName, bool keyOrIndex = false, bool? unicode = default, int? size = default, bool? rowVersion = default, bool? fixedLength = default, int? precision = default, int? scale = default);
public Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping? FindMapping (Type type, string? storeTypeName, bool keyOrIndex = false, bool? unicode = default, int? size = default, bool? rowVersion = default, bool? fixedLength = default, int? precision = default, int? scale = default);
abstract member FindMapping : Type * string * bool * Nullable<bool> * Nullable<int> * Nullable<bool> * Nullable<bool> * Nullable<int> * Nullable<int> -> Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping
Public Function FindMapping (type As Type, storeTypeName As String, Optional keyOrIndex As Boolean = false, Optional unicode As Nullable(Of Boolean) = Nothing, Optional size As Nullable(Of Integer) = Nothing, Optional rowVersion As Nullable(Of Boolean) = Nothing, Optional fixedLength As Nullable(Of Boolean) = Nothing, Optional precision As Nullable(Of Integer) = Nothing, Optional scale As Nullable(Of Integer) = Nothing) As RelationalTypeMapping
Parameters
- type
- Type
The CLR type.
- storeTypeName
- String
The database type name.
- keyOrIndex
- Boolean
If true
, then a special mapping for a key or index may be returned.
Specify true
for Unicode mapping, false
for Ansi mapping or null
for the
default.
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
Entity Framework