IConventionForeignKeyBuilder.IsConstrained 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
配置關係是否受限(並保證每個外鍵值皆有匹配主鍵存在)。
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionForeignKeyBuilder? IsConstrained(bool? constrained, bool fromDataAnnotation = false);
abstract member IsConstrained : Nullable<bool> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionForeignKeyBuilder
Public Function IsConstrained (constrained As Nullable(Of Boolean), Optional fromDataAnnotation As Boolean = false) As IConventionForeignKeyBuilder
參數
- fromDataAnnotation
- Boolean
表示配置是否以資料註解方式指定。
傳回
如果限制性被設定,則使用同一個建構者實例, null 否則。