MutableEntityTypeExtensions.AddIndex 方法

定义

向此实体类型添加索引。

public static Microsoft.EntityFrameworkCore.Metadata.IMutableIndex AddIndex (this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, Microsoft.EntityFrameworkCore.Metadata.IMutableProperty property);
static member AddIndex : Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType * Microsoft.EntityFrameworkCore.Metadata.IMutableProperty -> Microsoft.EntityFrameworkCore.Metadata.IMutableIndex
<Extension()>
Public Function AddIndex (entityType As IMutableEntityType, property As IMutableProperty) As IMutableIndex

参数

entityType
IMutableEntityType

实体类型。

property
IMutableProperty

要编制索引的属性。

返回

新创建的索引。

适用于