RelationalTypeMappingSource.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(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(Type, IModel, CoreTypeMapping) |
Finds the type mapping for a given Type, taking pre-convention configuration into the account. |
FindMapping(Type) |
Finds the type mapping for a given Type. |
FindMapping(String) |
Finds the type mapping for a given database type name. |
FindMapping(Type, IModel) |
Finds the type mapping for a given Type, taking pre-convention configuration into the account. |
FindMapping(TypeMappingInfo) |
Call Microsoft.EntityFrameworkCore.Storage.RelationalTypeMappingSource.FindMapping(Microsoft.EntityFrameworkCore.Storage.RelationalTypeMappingInfo@) instead |
FindMapping(RelationalTypeMappingInfo) |
Overridden by relational database providers to find a type mapping for the given info. |
FindMapping(IProperty) |
Finds the type mapping for a given IProperty. |
FindMapping(IElementType) |
Finds the type mapping for the given IElementType. |
FindMapping(MemberInfo) |
Finds the type mapping for a given MemberInfo representing a field or a property of a CLR type. |
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 virtual 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 virtual 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);
override this.FindMapping : Type * string * bool * Nullable<bool> * Nullable<int> * Nullable<bool> * Nullable<bool> * Nullable<int> * Nullable<int> -> Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping
Public Overridable 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.
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, IModel, CoreTypeMapping)
Finds the type mapping for a given Type, taking pre-convention configuration into the account.
[System.Runtime.CompilerServices.PreserveBaseOverrides]
public virtual Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping? FindMapping (Type type, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping? elementMapping = default);
[<System.Runtime.CompilerServices.PreserveBaseOverrides>]
override this.FindMapping : Type * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping -> Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping
Public Overridable 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.
Implements
- Attributes
Remarks
Note: Only call this method if there is no IProperty, otherwise call FindMapping(IProperty).
Applies to
FindMapping(Type)
Finds the type mapping for a given Type.
public override Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping FindMapping (Type type);
public override Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping? FindMapping (Type type);
[System.Runtime.CompilerServices.PreserveBaseOverrides]
public virtual Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping? FindMapping (Type type);
override this.FindMapping : Type -> Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping
[<System.Runtime.CompilerServices.PreserveBaseOverrides>]
override this.FindMapping : Type -> Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping
Public Overrides Function FindMapping (type As Type) As CoreTypeMapping
Public Overridable Function FindMapping (type As Type) As RelationalTypeMapping
Parameters
- type
- Type
The CLR type.
Returns
The type mapping, or null
if none was found.
Implements
- Attributes
Remarks
Note: Only call this method if there is no IProperty or IModel available, otherwise call FindMapping(IProperty) or FindMapping(Type, IModel, CoreTypeMapping)
Note: providers should typically not need to override this method.
Applies to
FindMapping(String)
Finds the type mapping for a given database type name.
public virtual Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping FindMapping (string storeTypeName);
public virtual Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping? FindMapping (string storeTypeName);
override this.FindMapping : string -> Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping
Public Overridable Function FindMapping (storeTypeName As String) As RelationalTypeMapping
Parameters
- storeTypeName
- String
The database type name.
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, IModel)
Finds the type mapping for a given Type, taking pre-convention configuration into the account.
public override Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping? FindMapping (Type type, Microsoft.EntityFrameworkCore.Metadata.IModel model);
[System.Runtime.CompilerServices.PreserveBaseOverrides]
public virtual Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping? FindMapping (Type type, Microsoft.EntityFrameworkCore.Metadata.IModel model);
override this.FindMapping : Type * Microsoft.EntityFrameworkCore.Metadata.IModel -> Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping
[<System.Runtime.CompilerServices.PreserveBaseOverrides>]
override this.FindMapping : Type * Microsoft.EntityFrameworkCore.Metadata.IModel -> Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping
Public Overrides Function FindMapping (type As Type, model As IModel) As CoreTypeMapping
Public Overridable 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.
Implements
- Attributes
Remarks
Note: Only call this method if there is no IProperty, otherwise call FindMapping(IProperty).
Applies to
FindMapping(TypeMappingInfo)
Call Microsoft.EntityFrameworkCore.Storage.RelationalTypeMappingSource.FindMapping(Microsoft.EntityFrameworkCore.Storage.RelationalTypeMappingInfo@) instead
protected override Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping FindMapping (in Microsoft.EntityFrameworkCore.Storage.TypeMappingInfo mappingInfo);
override this.FindMapping : TypeMappingInfo -> Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping
Protected Overrides 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.
Applies to
FindMapping(RelationalTypeMappingInfo)
Overridden by relational database providers to find a type mapping for the given info.
protected abstract Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping FindMapping (in Microsoft.EntityFrameworkCore.Storage.RelationalTypeMappingInfo mappingInfo);
protected virtual Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping FindMapping (in Microsoft.EntityFrameworkCore.Storage.RelationalTypeMappingInfo mappingInfo);
protected virtual Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping? FindMapping (in Microsoft.EntityFrameworkCore.Storage.RelationalTypeMappingInfo? mappingInfo);
override this.FindMapping : RelationalTypeMappingInfo -> Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping
Protected MustOverride Function FindMapping (mappingInfo As RelationalTypeMappingInfo) As RelationalTypeMapping
Protected Overridable Function FindMapping (mappingInfo As RelationalTypeMappingInfo) As RelationalTypeMapping
Parameters
- mappingInfo
- RelationalTypeMappingInfo
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(IProperty)
Finds the type mapping for a given IProperty.
public override Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping FindMapping (Microsoft.EntityFrameworkCore.Metadata.IProperty property);
public override Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping? FindMapping (Microsoft.EntityFrameworkCore.Metadata.IProperty property);
override this.FindMapping : Microsoft.EntityFrameworkCore.Metadata.IProperty -> Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping
Public Overrides 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(IElementType)
Finds the type mapping for the given IElementType.
public override Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping? FindMapping (Microsoft.EntityFrameworkCore.Metadata.IElementType elementType);
override this.FindMapping : Microsoft.EntityFrameworkCore.Metadata.IElementType -> Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping
Public Overrides Function FindMapping (elementType As IElementType) As CoreTypeMapping
Parameters
- elementType
- IElementType
The collection element.
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(MemberInfo)
Finds the type mapping for a given MemberInfo representing a field or a property of a CLR type.
public override Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping FindMapping (System.Reflection.MemberInfo member);
public override Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping? FindMapping (System.Reflection.MemberInfo member);
[System.Runtime.CompilerServices.PreserveBaseOverrides]
public virtual Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping? FindMapping (System.Reflection.MemberInfo member);
override this.FindMapping : System.Reflection.MemberInfo -> Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping
[<System.Runtime.CompilerServices.PreserveBaseOverrides>]
override this.FindMapping : System.Reflection.MemberInfo -> Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping
Public Overrides Function FindMapping (member As MemberInfo) As CoreTypeMapping
Public Overridable Function FindMapping (member As MemberInfo) As RelationalTypeMapping
Parameters
- member
- MemberInfo
The field or property.
Returns
The type mapping, or null
if none was found.
Implements
- Attributes
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
Entity Framework
Feedback
https://aka.ms/ContentUserFeedback.
Binnenkort beschikbaar: In de loop van 2024 zullen we GitHub-problemen geleidelijk uitfaseren als het feedbackmechanisme voor inhoud en deze vervangen door een nieuw feedbacksysteem. Zie voor meer informatie:Feedback verzenden en weergeven voor