Language

ReferenceCollectionBuilder<TPrincipalEntity,TDependentEntity>.IsConstrained メソッド

定義

リレーションシップが制約されているかどうかを構成します。 false場合、データベース外部キー制約は作成されず、外部キー プロパティが null 非許容の場合でも、クエリはリレーションシップを省略可能として扱います (プリンシパルは存在すると見なされません)。 これは変更の追跡には影響しません。 IsConstrainedを参照してください。

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder<TPrincipalEntity,TDependentEntity> IsConstrained(bool constrained = true);
override this.IsConstrained : bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder<'PrincipalEntity, 'DependentEntity (requires 'PrincipalEntity : null and 'DependentEntity : null)>
Public Overridable Function IsConstrained (Optional constrained As Boolean = true) As ReferenceCollectionBuilder(Of TPrincipalEntity, TDependentEntity)

パラメーター

constrained
Boolean

リレーションシップが制約されているかどうかを示す値。

戻り値

複数の構成呼び出しをチェーンできるように、同じビルダー インスタンス。

適用対象