IMutableEntityType.GetDeclaredKeys 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得指定 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() 也會傳回在基底類型上宣告的索引鍵。