IEntityType.FindPrimaryKey Method

Definition

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

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

Returns

The primary key, or null if none is defined.

Applies to