語言

IConventionForeignKeyBuilder.CanSetIsConstrained 方法

定義

回傳一個值,表示是否能從目前配置來源設定關係約束性。

public bool CanSetIsConstrained(bool? constrained, bool fromDataAnnotation = false);
abstract member CanSetIsConstrained : Nullable<bool> * bool -> bool
Public Function CanSetIsConstrained (constrained As Nullable(Of Boolean), Optional fromDataAnnotation As Boolean = false) As Boolean

參數

constrained
Nullable<Boolean>

一個表示關係是否受限的值。 null 重置為預設值。

fromDataAnnotation
Boolean

表示配置是否以資料註解方式指定。

傳回

true 如果關係限制可以被設定。

適用於