共用方式為


RuntimeEntityType.IEntityType.FindPrimaryKey 方法

定義

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

[System.Diagnostics.DebuggerStepThrough]
Microsoft.EntityFrameworkCore.Metadata.IKey? IEntityType.FindPrimaryKey ();
[System.Diagnostics.DebuggerStepThrough]
Microsoft.EntityFrameworkCore.Metadata.IKey IEntityType.FindPrimaryKey ();
[<System.Diagnostics.DebuggerStepThrough>]
abstract member Microsoft.EntityFrameworkCore.Metadata.IEntityType.FindPrimaryKey : unit -> Microsoft.EntityFrameworkCore.Metadata.IKey
override this.Microsoft.EntityFrameworkCore.Metadata.IEntityType.FindPrimaryKey : unit -> Microsoft.EntityFrameworkCore.Metadata.IKey
Function FindPrimaryKey () As IKey Implements IEntityType.FindPrimaryKey

傳回

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

實作

屬性

適用於