共用方式為


RelationshipDiscoveryConvention.ShouldBeOwned(Type, IConventionModel) 方法

定義

傳回值,指出如果指定的實體類型目前不在模型中,是否應該新增為擁有。

protected virtual bool? ShouldBeOwned (Type targetType, Microsoft.EntityFrameworkCore.Metadata.IConventionModel model);
abstract member ShouldBeOwned : Type * Microsoft.EntityFrameworkCore.Metadata.IConventionModel -> Nullable<bool>
override this.ShouldBeOwned : Type * Microsoft.EntityFrameworkCore.Metadata.IConventionModel -> Nullable<bool>
Protected Overridable Function ShouldBeOwned (targetType As Type, model As IConventionModel) As Nullable(Of Boolean)

參數

targetType
Type

目標實體類型。

model
IConventionModel

模型本身。

傳回

true 如果應該擁有指定的實體類型,則為 。

適用於