共用方式為


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 如果可以從這個實體類型中移除外鍵,則為 。

適用於