IReadOnlyForeignKey.IsConstrained Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before itβs released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a value indicating whether the relationship is constrained, that is, backed by a guarantee
(such as a database foreign key constraint) that a matching principal key exists for every set
foreign key value. When false, no database foreign key constraint is created and
queries treat the relationship as optional even when the foreign key properties are non-nullable β
the principal is loaded with a left join and is never assumed to exist. This does not affect change
tracking: a required (IsRequired) relationship still cascades or produces a conceptual
null when severed, regardless of this value.
public bool IsConstrained { get; }
member this.IsConstrained : bool
Public ReadOnly Property IsConstrained As Boolean