語言

IConventionForeignKey.SetProperties 方法

定義

設定外鍵屬性及目標主鍵。

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

表示配置是否以資料註解方式指定。

傳回

配置好的外鍵屬性。

適用於