IReadOnlyEntityType.GetDeclaredKeys 方法

定義

取得在此實體類型上宣告的所有索引鍵。

public System.Collections.Generic.IEnumerable<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyKey> GetDeclaredKeys ();
abstract member GetDeclaredKeys : unit -> seq<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyKey>
Public Function GetDeclaredKeys () As IEnumerable(Of IReadOnlyKey)

傳回

宣告的索引鍵。

備註

這個方法不會傳回在基底類型上宣告的索引鍵。 逐一查看所有實體類型時,可避免多次處理相同的索引鍵。 使用 GetKeys() 也會傳回在基底類型上宣告的索引鍵。

適用於