ConventionModelExtensions.FindEntityType 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
FindEntityType(IConventionModel, Type) |
取得對應指定實體類別的實體。 |
FindEntityType(IConventionModel, Type, String, IConventionEntityType) |
取得指定名稱的實體類型,定義導覽名稱和定義實體類型。 如果找不到相符的實體類型,則傳 |
FindEntityType(IConventionModel, Type)
取得對應指定實體類別的實體。 null
如果找不到具有指定名稱的實體類型,則傳回 。
public static Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType FindEntityType (this Microsoft.EntityFrameworkCore.Metadata.IConventionModel model, Type type);
static member FindEntityType : Microsoft.EntityFrameworkCore.Metadata.IConventionModel * Type -> Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType
<Extension()>
Public Function FindEntityType (model As IConventionModel, type As Type) As IConventionEntityType
參數
- model
- IConventionModel
要尋找實體類型的模型。
- type
- Type
要尋找對應實體類型的型別。
傳回
實體類型,如果找不到,則 null
為 。
適用於
FindEntityType(IConventionModel, Type, String, IConventionEntityType)
取得指定名稱的實體類型,定義導覽名稱和定義實體類型。 如果找不到相符的實體類型,則傳 null
回 。
public static Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType FindEntityType (this Microsoft.EntityFrameworkCore.Metadata.IConventionModel model, Type type, string definingNavigationName, Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType definingEntityType);
static member FindEntityType : Microsoft.EntityFrameworkCore.Metadata.IConventionModel * Type * string * Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType -> Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType
<Extension()>
Public Function FindEntityType (model As IConventionModel, type As Type, definingNavigationName As String, definingEntityType As IConventionEntityType) As IConventionEntityType
參數
- model
- IConventionModel
要尋找實體類型的模型。
- type
- Type
要尋找的實體類型類型。
- definingNavigationName
- String
要尋找之實體類型的定義導覽。
- definingEntityType
- IConventionEntityType
要尋找之實體類型的定義實體類型。
傳回
實體類型,如果找不到實體類型,則 null
為 。
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應