IRelationalTypeMappingSource.FindMapping 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
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
為 。
備註
注意:只有在沒有 IProperty 或 IModel 可用時,才呼叫這個方法,否則請呼叫 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
為 ,則可能會傳回索引鍵或索引的特殊對應。
傳回
類型對應,如果找不到,則 null
為 。
備註
注意:只有在沒有 IProperty 可用時呼叫這個方法,否則呼叫 FindMapping(IProperty)
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應