Delen via


IConventionForeignKey.SetIsRequiredDependent Method

Definition

Sets a value indicating whether the dependent entity is required. If true, the principal entity must always have a valid dependent entity assigned.

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)

Parameters

required
Nullable<Boolean>

A value indicating whether the dependent entity is required.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The configured requiredness.

Applies to