RuntimeEntityType.FindKey(IReadOnlyList<IReadOnlyProperty>) 方法

定义

获取在给定属性上定义的主键或备用键。 null如果未为给定属性定义键,则返回 。

public virtual Microsoft.EntityFrameworkCore.Metadata.RuntimeKey? FindKey (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty> properties);
abstract member FindKey : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty> -> Microsoft.EntityFrameworkCore.Metadata.RuntimeKey
override this.FindKey : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty> -> Microsoft.EntityFrameworkCore.Metadata.RuntimeKey
Public Overridable Function FindKey (properties As IReadOnlyList(Of IReadOnlyProperty)) As RuntimeKey

参数

properties
IReadOnlyList<IReadOnlyProperty>

构成键的属性。

返回

键;如果未定义任何项, null 则为 。

适用于