Jazyk

ReferenceCollectionBuilder<TPrincipalEntity,TDependentEntity>.IsConstrained Metoda

Definice

Konfiguruje, jestli je relace omezená. Pokud falsese nevytvoří žádné omezení cizího klíče databáze a dotazy považují relaci za nepovinnou (objekt zabezpečení se nepředpokládá, že existuje), i když vlastnosti cizího klíče nejsou nullable. To nemá vliv na sledování změn. Viz 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)

Parametry

constrained
Boolean

Hodnota označující, zda je relace omezena.

Návraty

Stejná instance tvůrce, aby bylo možné zřetězených více volání konfigurace.

Platí pro