MigrationBuilder.DropIndex(String, String, String) 方法

定义

生成 以 DropIndexOperation 删除现有索引。

public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.DropIndexOperation> DropIndex (string name, string table = default, string schema = default);
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.DropIndexOperation> DropIndex (string name, string? table = default, string? schema = default);
abstract member DropIndex : string * string * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.DropIndexOperation>
override this.DropIndex : string * string * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.DropIndexOperation>
Public Overridable Function DropIndex (name As String, Optional table As String = Nothing, Optional schema As String = Nothing) As OperationBuilder(Of DropIndexOperation)

参数

name
String

要删除的索引的名称。

table
String

包含索引的表。

schema
String

包含表的架构,或使用 null 默认架构。

返回

一个生成器,允许将批注添加到操作中。

注解

有关详细信息和示例 ,请参阅数据库迁移

适用于