共用方式為


IRelationalTypeMappingSource.FindMapping 方法

定義

多載

FindMapping(IProperty)

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

FindMapping(MemberInfo)

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

FindMapping(String)

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

FindMapping(Type)

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

FindMapping(Type, IModel)

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

FindMapping(Type, IModel, CoreTypeMapping)

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

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

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

FindMapping(IProperty)

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

參數

property
IProperty

屬性。

傳回

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

適用於

FindMapping(MemberInfo)

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

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

參數

member
MemberInfo

欄位或屬性。

傳回

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

備註

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

適用於

FindMapping(String)

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

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

參數

storeTypeName
String

資料庫類型名稱。

傳回

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

備註

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

適用於

FindMapping(Type)

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

參數

type
Type

CLR 型別。

傳回

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

備註

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

適用於

FindMapping(Type, IModel)

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

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

參數

type
Type

CLR 型別。

model
IModel

模型本身。

傳回

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

備註

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

適用於

FindMapping(Type, IModel, CoreTypeMapping)

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

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

參數

type
Type

CLR 型別。

model
IModel

模型本身。

elementMapping
CoreTypeMapping

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

傳回

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

備註

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

適用於

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

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

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

參數

type
Type

CLR 型別。

storeTypeName
String

資料庫類型名稱。

keyOrIndex
Boolean

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

unicode
Nullable<Boolean>

指定 true Unicode 對應、 false 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)

適用於