EntityTypeExtensions.FindIndex(IEntityType, IProperty) 方法

定义

获取在给定属性上定义的未命名索引。 null如果未定义此类索引,则返回 。

即使属性列表匹配,也不会返回命名索引。

public static Microsoft.EntityFrameworkCore.Metadata.IIndex FindIndex (this Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType, Microsoft.EntityFrameworkCore.Metadata.IProperty property);
static member FindIndex : Microsoft.EntityFrameworkCore.Metadata.IEntityType * Microsoft.EntityFrameworkCore.Metadata.IProperty -> Microsoft.EntityFrameworkCore.Metadata.IIndex
<Extension()>
Public Function FindIndex (entityType As IEntityType, property As IProperty) As IIndex

参数

entityType
IEntityType

实体类型。

property
IProperty

要查找其索引的属性。

返回

索引;如果未找到任何索引,则为 null。

适用于