IConventionForeignKey.SetProperties 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
設定外鍵屬性及目標主鍵。
public System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> SetProperties(System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> properties, Microsoft.EntityFrameworkCore.Metadata.IConventionKey principalKey, bool fromDataAnnotation = false);
public void SetProperties(System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> properties, Microsoft.EntityFrameworkCore.Metadata.IConventionKey principalKey, bool fromDataAnnotation = false);
abstract member SetProperties : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> * Microsoft.EntityFrameworkCore.Metadata.IConventionKey * bool -> System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty>
abstract member SetProperties : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> * Microsoft.EntityFrameworkCore.Metadata.IConventionKey * bool -> unit
Public Function SetProperties (properties As IReadOnlyList(Of IConventionProperty), principalKey As IConventionKey, Optional fromDataAnnotation As Boolean = false) As IReadOnlyList(Of IConventionProperty)
Public Sub SetProperties (properties As IReadOnlyList(Of IConventionProperty), principalKey As IConventionKey, Optional fromDataAnnotation As Boolean = false)
參數
- properties
- IReadOnlyList<IConventionProperty>
依賴實體中的外鍵屬性。
- principalKey
- IConventionKey
目標的主鑰匙或備用鑰匙。
- fromDataAnnotation
- Boolean
表示配置是否以資料註解方式指定。
傳回
配置好的外鍵屬性。