IConventionForeignKey.SetIsRequiredDependent 方法

定義

設定值,指出是否需要相依實體。 如果 true 為 ,則主體實體必須一律指派有效的相依實體。

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

參數

required
Nullable<Boolean>

值,指出是否需要相依實體。

fromDataAnnotation
Boolean

指出是否已使用資料批註指定組態。

傳回

已設定的必要專案。

適用於