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

指示是否使用数据注释指定配置。

返回

配置的外键属性。

适用于