共用方式為


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

定義

RenameColumnOperation建置 以重新命名現有的資料行。

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

參數

name
String

要重新命名的資料行名稱。

table
String

包含資料行的資料表。

newName
String

資料行的新名稱。

schema
String

包含資料表的架構,或使用 null 預設架構。

傳回

允許將批註加入至作業的產生器。

備註

如需詳細資訊和範例 ,請參閱資料庫移轉

適用於