共用方式為


RelationalTypeMappingSource.FindMapping 方法

定義

多載

FindMapping(Type, String, Boolean, Nullable<Boolean>, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Int32>, Nullable<Int32>)

尋找指定 Type 和其他 Facet 的類型對應。

FindMapping(Type, IModel, CoreTypeMapping)

尋找指定 Type 的類型對應,並將預先慣例組態納入帳戶中。

FindMapping(Type)

尋找指定 Type 之 的型別對應。

FindMapping(String)

尋找指定資料庫類型名稱的類型對應。

FindMapping(Type, IModel)

尋找指定 Type 的類型對應,並將預先慣例組態納入帳戶中。

FindMapping(TypeMappingInfo)

改為呼叫 Microsoft.EntityFrameworkCore.Storage.RelationalTypeMappingSource.FindMapping(Microsoft.EntityFrameworkCore.Storage.RelationalTypeMappingInfo@)

FindMapping(RelationalTypeMappingInfo)

由關係資料庫提供者覆寫,以尋找指定資訊的型別對應。

FindMapping(IProperty)

尋找指定 IProperty 之 的型別對應。

FindMapping(IElementType)

尋找指定 IElementType 之 的型別對應。

FindMapping(MemberInfo)

尋找代表 CLR 型別之欄位或屬性的指定 MemberInfo 型別對應。

FindMapping(Type, String, Boolean, Nullable<Boolean>, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Int32>, Nullable<Int32>)

尋找指定 Type 和其他 Facet 的類型對應。

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

參數

type
Type

CLR 型別。

storeTypeName
String

資料庫類型名稱。

keyOrIndex
Boolean

如果 true 為 ,則可能會傳回索引鍵或索引的特殊對應。

unicode
Nullable<Boolean>

指定 Unicode 或 ANSI 對應,或 null 指定預設值。

size
Nullable<Int32>

指定對應的大小,或 null 指定預設值。

rowVersion
Nullable<Boolean>

指定資料列版本或 null 預設值。

fixedLength
Nullable<Boolean>

指定固定長度對應,或 null 指定預設值。

precision
Nullable<Int32>

指定對應的有效位數,或 null 指定預設值。

scale
Nullable<Int32>

指定對應的小數位數,或 null 指定預設值。

傳回

類型對應,如果找不到,則 null 為 。

實作

備註

注意:只有在沒有 IProperty 可用時呼叫這個方法,否則呼叫 FindMapping(IProperty)

注意:提供者通常不需要覆寫此方法。

適用於

FindMapping(Type, IModel, CoreTypeMapping)

尋找指定 Type 的類型對應,並將預先慣例組態納入帳戶中。

[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

參數

type
Type

CLR 型別。

model
IModel

模型本身。

elementMapping
CoreTypeMapping

如果已知,則為要使用的專案對應。

傳回

類型對應,如果找不到,則 null 為 。

實作

屬性

備註

注意:只有在沒有 IProperty 時呼叫這個方法,否則請呼叫 FindMapping(IProperty)

適用於

FindMapping(Type)

尋找指定 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

參數

type
Type

CLR 型別。

傳回

類型對應,如果找不到,則 null 為 。

實作

屬性

備註

注意:只有在沒有 IPropertyIModel 可用時,才呼叫這個方法,否則請呼叫 FindMapping(IProperty)FindMapping(Type, IModel, CoreTypeMapping)

注意:提供者通常不需要覆寫此方法。

適用於

FindMapping(String)

尋找指定資料庫類型名稱的類型對應。

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

參數

storeTypeName
String

資料庫類型名稱。

傳回

類型對應,如果找不到,則 null 為 。

實作

備註

注意:只有在沒有 IProperty 可用時呼叫這個方法,否則呼叫 FindMapping(IProperty)

注意:提供者通常不需要覆寫此方法。

適用於

FindMapping(Type, IModel)

尋找指定 Type 的類型對應,並將預先慣例組態納入帳戶中。

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

參數

type
Type

CLR 型別。

model
IModel

模型本身。

傳回

類型對應,如果找不到,則 null 為 。

實作

屬性

備註

注意:只有在沒有 IProperty 時呼叫這個方法,否則請呼叫 FindMapping(IProperty)

適用於

FindMapping(TypeMappingInfo)

改為呼叫 Microsoft.EntityFrameworkCore.Storage.RelationalTypeMappingSource.FindMapping(Microsoft.EntityFrameworkCore.Storage.RelationalTypeMappingInfo@)

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

參數

mappingInfo
TypeMappingInfo

要用來建立對應的對應資訊。

傳回

類型對應,如果找不到,則 null 為 。

適用於

FindMapping(RelationalTypeMappingInfo)

由關係資料庫提供者覆寫,以尋找指定資訊的型別對應。

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

參數

mappingInfo
RelationalTypeMappingInfo

要用來建立對應的對應資訊。

傳回

類型對應,如果找不到,則 null 為 。

備註

對應資訊會填入所需類型對應的詳細資訊,就像可用一樣。 使用建立最佳對應所需的所有資訊。 如果沒有可用的對應,則傳回 null

適用於

FindMapping(IProperty)

尋找指定 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

參數

property
IProperty

屬性。

傳回

類型對應,如果找不到,則 null 為 。

實作

備註

注意:提供者通常不需要覆寫此方法。

適用於

FindMapping(IElementType)

尋找指定 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

參數

elementType
IElementType

集合專案。

傳回

類型對應,如果找不到,則 null 為 。

實作

備註

注意:提供者通常不需要覆寫此方法。

適用於

FindMapping(MemberInfo)

尋找代表 CLR 型別之欄位或屬性的指定 MemberInfo 型別對應。

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

參數

member
MemberInfo

欄位或屬性。

傳回

類型對應,如果找不到,則 null 為 。

實作

屬性

備註

注意:只有在沒有 IProperty 可用時呼叫這個方法,否則呼叫 FindMapping(IProperty)

注意:提供者通常不需要覆寫此方法。

適用於