MutableEntityTypeExtensions.GetDeclaredIndexes(IMutableEntityType) 方法

定义

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

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

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

参数

entityType
IMutableEntityType

实体类型。

返回

声明的索引。

适用于