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() 还返回在基类型上声明的键。

适用于