ModelExtensions.FindRuntimeEntityType(IModel, Type) 方法

定義

取得對應指定實體類別的實體,其中 類別可能是衍生自實際實體類型的 Proxy。 null如果找不到具有指定 CLR 類型的實體類型,或共用類型實體類型正在使用指定的 CLR 類型,或實體類型具有定義導覽,則傳回 。

public static Microsoft.EntityFrameworkCore.Metadata.IEntityType FindRuntimeEntityType (this Microsoft.EntityFrameworkCore.Metadata.IModel model, Type type);
static member FindRuntimeEntityType : Microsoft.EntityFrameworkCore.Metadata.IModel * Type -> Microsoft.EntityFrameworkCore.Metadata.IEntityType
<Extension()>
Public Function FindRuntimeEntityType (model As IModel, type As Type) As IEntityType

參數

model
IModel

要尋找實體類型的模型。

type
Type

要尋找對應實體類型的型別。

傳回

實體類型,如果找不到,則 null 為 。

適用於