共用方式為


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

定義

建置 以 RenameSequenceOperation 重新命名現有的序列。

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

參數

name
String

要重新命名的序列名稱。

schema
String

包含序列的架構,或使用 null 預設架構。

newName
String

新的序列名稱,如果只有架構已變更,則 null 為 。

newSchema
String

新的架構名稱,如果只有名稱已變更,則 null 為 。

傳回

建置器,允許將批註新增至作業。

備註

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

適用於