IConventionEntityTypeBuilder.GetTargetEntityTypeBuilder 方法

定義

取得或建立潛在導覽目標的產生器。

public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder? GetTargetEntityTypeBuilder (Type targetClrType, System.Reflection.MemberInfo navigationInfo, bool createIfMissing = true, bool? targetShouldBeOwned = default, bool fromDataAnnotation = false);
abstract member GetTargetEntityTypeBuilder : Type * System.Reflection.MemberInfo * bool * Nullable<bool> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder
Public Function GetTargetEntityTypeBuilder (targetClrType As Type, navigationInfo As MemberInfo, Optional createIfMissing As Boolean = true, Optional targetShouldBeOwned As Nullable(Of Boolean) = Nothing, Optional fromDataAnnotation As Boolean = false) As IConventionEntityTypeBuilder

參數

targetClrType
Type

目標的 CLR 類型。

navigationInfo
MemberInfo

瀏覽屬性。

createIfMissing
Boolean

如果目前不在模型中,是否應該建立實體類型。

targetShouldBeOwned
Nullable<Boolean>

是否應該擁有目標。 null 如果它可以是 ,則為 。

fromDataAnnotation
Boolean

指出是否使用資料批註來指定組態。

傳回

實體類型產生器, null 如果找不到且無法建立,則為 。

適用於