共用方式為


IConventionForeignKey.SetProperties 方法

定義

設定外鍵屬性,以及該目標主體索引鍵。

public void SetProperties (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> properties, Microsoft.EntityFrameworkCore.Metadata.IConventionKey principalKey, bool fromDataAnnotation = false);
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);
abstract member SetProperties : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> * Microsoft.EntityFrameworkCore.Metadata.IConventionKey * bool -> unit
abstract member SetProperties : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> * Microsoft.EntityFrameworkCore.Metadata.IConventionKey * bool -> System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty>
Public Sub SetProperties (properties As IReadOnlyList(Of IConventionProperty), principalKey As IConventionKey, Optional fromDataAnnotation As Boolean = false)
Public Function SetProperties (properties As IReadOnlyList(Of IConventionProperty), principalKey As IConventionKey, Optional fromDataAnnotation As Boolean = false) As IReadOnlyList(Of IConventionProperty)

參數

properties
IReadOnlyList<IConventionProperty>

相依實體中的外鍵屬性。

principalKey
IConventionKey

要設為目標的主要或替代索引鍵。

fromDataAnnotation
Boolean

指出是否使用資料批註來指定組態。

傳回

已設定的外鍵屬性。

適用於