MutableModelExtensions.FindEntityType 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
FindEntityType(IMutableModel, Type) |
取得對應指定實體類別的實體。 |
FindEntityType(IMutableModel, Type, String, IMutableEntityType) |
取得指定名稱的實體類型,定義導覽名稱和定義實體類型。 如果找不到相符的實體類型,則傳 |
FindEntityType(IMutableModel, Type)
取得對應指定實體類別的實體。 null
如果找不到具有指定 CLR 類型的實體類型,或共用類型實體類型正在使用指定的 CLR 類型,或實體類型具有定義導覽,則傳回 。
public static Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType FindEntityType (this Microsoft.EntityFrameworkCore.Metadata.IMutableModel model, Type type);
static member FindEntityType : Microsoft.EntityFrameworkCore.Metadata.IMutableModel * Type -> Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType
<Extension()>
Public Function FindEntityType (model As IMutableModel, type As Type) As IMutableEntityType
參數
- model
- IMutableModel
要尋找實體類型的模型。
- type
- Type
要尋找對應實體類型的型別。
傳回
實體類型,如果找不到,則 null
為 。
適用於
FindEntityType(IMutableModel, Type, String, IMutableEntityType)
取得指定名稱的實體類型,定義導覽名稱和定義實體類型。 如果找不到相符的實體類型,則傳 null
回 。
public static Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType FindEntityType (this Microsoft.EntityFrameworkCore.Metadata.IMutableModel model, Type type, string definingNavigationName, Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType definingEntityType);
static member FindEntityType : Microsoft.EntityFrameworkCore.Metadata.IMutableModel * Type * string * Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType -> Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType
<Extension()>
Public Function FindEntityType (model As IMutableModel, type As Type, definingNavigationName As String, definingEntityType As IMutableEntityType) As IMutableEntityType
參數
- model
- IMutableModel
要尋找實體類型的模型。
- type
- Type
要尋找的實體類型類型。
- definingNavigationName
- String
要尋找之實體類型的定義導覽。
- definingEntityType
- IMutableEntityType
要尋找之實體類型的定義實體類型。
傳回
實體類型,如果找不到實體類型,則 null
為 。