Langue

IReadOnlyForeignKey.IsConstrained Property

Definition

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

Property Value

Applies to