IMutableEntityType.FindPrimaryKey 方法

定义

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

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

返回

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

适用于