Share via


MigrationBuilder.DropTable(String, String) Method

Definition

Builds a DropTableOperation to drop an existing table.

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)

Parameters

name
String

The name of the table to drop.

schema
String

The schema that contains the table, or null to use the default schema.

Returns

A builder to allow annotations to be added to the operation.

Remarks

See Database migrations for more information and examples.

Applies to