IConventionEntityTypeBuilder.CanRemoveRelationship 方法

定义

返回一个值,该值指示是否可以从此实体类型中删除外键。

public bool CanRemoveRelationship (Microsoft.EntityFrameworkCore.Metadata.IConventionForeignKey foreignKey, bool fromDataAnnotation = false);
abstract member CanRemoveRelationship : Microsoft.EntityFrameworkCore.Metadata.IConventionForeignKey * bool -> bool
Public Function CanRemoveRelationship (foreignKey As IConventionForeignKey, Optional fromDataAnnotation As Boolean = false) As Boolean

参数

foreignKey
IConventionForeignKey

要删除的外键。

fromDataAnnotation
Boolean

指示是否使用数据注释指定配置。

返回

true 如果可以从此实体类型中删除外键,则为 。

适用于