EntityTypeExtensions.GetDeclaredIndexes(IEntityType) 方法

定义

获取在给定 IEntityType的 上声明的所有索引。

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

public static System.Collections.Generic.IEnumerable<Microsoft.EntityFrameworkCore.Metadata.IIndex> GetDeclaredIndexes (this Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType);
static member GetDeclaredIndexes : Microsoft.EntityFrameworkCore.Metadata.IEntityType -> seq<Microsoft.EntityFrameworkCore.Metadata.IIndex>
<Extension()>
Public Function GetDeclaredIndexes (entityType As IEntityType) As IEnumerable(Of IIndex)

参数

entityType
IEntityType

实体类型。

返回

声明的索引。

适用于