MigrationBuilder.DropTable(String, String) 方法

定义

生成 以 DropTableOperation 删除现有表。

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

参数

name
String

要删除的表的名称。

schema
String

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

返回

允许将批注添加到操作的生成器。

注解

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

适用于