共用方式為


RuntimeEntityType.IReadOnlyEntityType.FindPrimaryKey 方法

定義

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

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

傳回

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

實作

屬性

適用於