IMutableEntityType.GetDeclaredKeys 方法

定義

取得指定 IReadOnlyEntityType 上宣告的所有索引鍵。

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

傳回

宣告的索引鍵。

備註

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

適用於