Share via


IConventionEntityType.FindPrimaryKey Method

Definition

Gets primary key for this entity type. Returns null if no primary key is defined.

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

Returns

The primary key, or null if none is defined.

Applies to