IReadOnlyEntityType.FindPrimaryKey 方法

定义

获取此实体类型的主键。 null如果未定义主键,则返回 。

public Microsoft.EntityFrameworkCore.Metadata.IReadOnlyKey? FindPrimaryKey ();
abstract member FindPrimaryKey : unit -> Microsoft.EntityFrameworkCore.Metadata.IReadOnlyKey
Public Function FindPrimaryKey () As IReadOnlyKey

返回

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

适用于