IEntityType.FindPrimaryKey 方法

定义

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

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

返回

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

适用于