MutableModelExtensions.FindEntityType 方法

定義

多載

FindEntityType(IMutableModel, Type)

取得對應指定實體類別的實體。 null如果找不到具有指定 CLR 類型的實體類型,或共用類型實體類型正在使用指定的 CLR 類型,或實體類型具有定義導覽,則傳回 。

FindEntityType(IMutableModel, Type, String, IMutableEntityType)

取得指定名稱的實體類型,定義導覽名稱和定義實體類型。 如果找不到相符的實體類型,則傳 null 回 。

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 為 。

適用於