IConventionEntityType.GetDeclaredIndexes 方法

定义

获取在此实体类型上声明的所有索引。

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

返回

声明的索引。

注解

此方法不返回在基类型上声明的索引。 循环访问所有实体类型以避免多次处理同一索引时,此功能非常有用。 使用 GetIndexes() 还返回在基类型上声明的索引。

适用于