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 如果应拥有给定的实体类型,则为 。

适用于