IConventionEntityType.FindKey 方法

定义

重载

FindKey(IReadOnlyProperty)

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

FindKey(IReadOnlyList<IProperty>)

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

FindKey(IReadOnlyList<IReadOnlyProperty>)

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

FindKey(IReadOnlyProperty)

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

public virtual Microsoft.EntityFrameworkCore.Metadata.IConventionKey? FindKey (Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty property);
abstract member FindKey : Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty -> Microsoft.EntityFrameworkCore.Metadata.IConventionKey
override this.FindKey : Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty -> Microsoft.EntityFrameworkCore.Metadata.IConventionKey
Public Overridable Function FindKey (property As IReadOnlyProperty) As IConventionKey

参数

property
IReadOnlyProperty

定义键时所基于的属性。

返回

键,如果未定义,则为 null。

适用于

FindKey(IReadOnlyList<IProperty>)

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

public Microsoft.EntityFrameworkCore.Metadata.IConventionKey FindKey (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IProperty> properties);
abstract member FindKey : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IProperty> -> Microsoft.EntityFrameworkCore.Metadata.IConventionKey
Public Function FindKey (properties As IReadOnlyList(Of IProperty)) As IConventionKey

参数

properties
IReadOnlyList<IProperty>

构成键的属性。

返回

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

适用于

FindKey(IReadOnlyList<IReadOnlyProperty>)

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

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

参数

properties
IReadOnlyList<IReadOnlyProperty>

构成键的属性。

返回

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

适用于