IConventionEntityType.FindPrimaryKey 方法

定義

取得這個實體類型的主鍵。 如果未定義主鍵,則傳 null 回 。

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

傳回

主鍵,如果沒有定義,則 null 為 。

適用於