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

定义

生成 以 DropColumnOperation 删除现有列。

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

参数

name
String

要删除的列的名称。

table
String

包含列的表。

schema
String

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

返回

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

注解

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

适用于