語言

MigrationBuilder 類別

定義

一個提供類似流暢 API 的建置者來建置 MigrationOperations。

public class MigrationBuilder
[System.Runtime.CompilerServices.Nullable(0)]
public class MigrationBuilder
type MigrationBuilder = class
[<System.Runtime.CompilerServices.Nullable(0)>]
type MigrationBuilder = class
Public Class MigrationBuilder
繼承
MigrationBuilder
屬性

備註

更多資訊與範例請參見 資料庫遷移 。

建構函式

名稱 Description
MigrationBuilder(String)

建立一個新的建構者實例。

屬性

名稱 Description
ActiveProvider

所使用的資料庫提供者名稱。

Operations

正在建造的 s 清單 MigrationOperation。

方法

名稱 Description
AddCheckConstraint(String, String, String, String)

建立 並 AddCheckConstraintOperation 在表格中新增一個新的檢查約束。

AddColumn<T>(String, String, String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String, Nullable<Boolean>, String, String, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>)

建立 並 AddColumnOperation 在資料表中新增一欄。

AddColumn<T>(String, String, String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String, Nullable<Boolean>, String)

建立 並 AddColumnOperation 在資料表中新增一欄。

AddColumn<T>(String, String, String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String, Nullable<Boolean>)

建立 並 AddColumnOperation 在資料表中新增一欄。

AddColumn<T>(String, String, String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String)

建立 並 AddColumnOperation 在資料表中新增一欄。

AddForeignKey(String, String, String, String, String, String, String, ReferentialAction, ReferentialAction)

建立 並 AddForeignKeyOperation 為資料表新增外鍵。

AddForeignKey(String, String, String[], String, String, String, String[], ReferentialAction, ReferentialAction)

建立 並 AddForeignKeyOperation 為資料表新增一個新的複合(多欄)外鍵。

AddPrimaryKey(String, String, String, String)

建立 並 AddPrimaryKeyOperation 為資料表新增主鍵。

AddPrimaryKey(String, String, String[], String)

建立並 AddPrimaryKeyOperation 新增一個新的複合(多欄)主鍵到資料表。

AddUniqueConstraint(String, String, String, String)

建立 並 AddUniqueConstraintOperation 為表格新增唯一限制。

AddUniqueConstraint(String, String, String[], String)

建立 來 AddUniqueConstraintOperation 新增一個新的複合(多欄)唯一限制到資料表。

AlterColumn<T>(String, String, String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String, Type, String, Nullable<Boolean>, Nullable<Int32>, Boolean, Boolean, Object, String, String, Nullable<Boolean>, Nullable<Boolean>, String, String, String, String, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>)

建造並 AlterColumnOperation 修改現有柱子。

AlterColumn<T>(String, String, String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String, Type, String, Nullable<Boolean>, Nullable<Int32>, Boolean, Boolean, Object, String, String, Nullable<Boolean>, Nullable<Boolean>, String, String)

建造並 AlterColumnOperation 修改現有柱子。

AlterColumn<T>(String, String, String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String, Type, String, Nullable<Boolean>, Nullable<Int32>, Boolean, Boolean, Object, String, String, Nullable<Boolean>, Nullable<Boolean>)

建造並 AlterColumnOperation 修改現有柱子。

AlterColumn<T>(String, String, String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String, Type, String, Nullable<Boolean>, Nullable<Int32>, Boolean, Boolean, Object, String, String)

建造並 AlterColumnOperation 修改現有柱子。

AlterColumn<T>(String, String, String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String)

一個提供類似流暢 API 的建置者來建置 MigrationOperations。

AlterDatabase()

建立並 AlterDatabaseOperation 修改現有資料庫。

AlterDatabase(String, String)

建立並 AlterDatabaseOperation 修改現有資料庫。

AlterSequence(String, String, Int32, Nullable<Int64>, Nullable<Int64>, Boolean, Int32, Nullable<Int64>, Nullable<Int64>, Boolean)

建立 並 AlterSequenceOperation 修改現有序列。

AlterSequence(String, String, Int32, Nullable<Int64>, Nullable<Int64>, Boolean)

一個提供類似流暢 API 的建置者來建置 MigrationOperations。

AlterTable(String, String, String, String)

建立並 AlterTableOperation 修改現有表格。

AlterTable(String, String)

建立並 AlterTableOperation 修改現有表格。

CreateIndex(String, String, String, String, Boolean, String, Boolean[])

建立一個 CreateIndexOperation 以建立新的索引。

CreateIndex(String, String, String, String, Boolean, String)

建立一個 CreateIndexOperation 以建立新的索引。

CreateIndex(String, String, String, String, Boolean)

一個提供類似流暢 API 的建置者來建置 MigrationOperations。

CreateIndex(String, String, String[], String, Boolean, String, Boolean[])

建立 以 CreateIndexOperation 建立新的複合(多欄)索引。

CreateIndex(String, String, String[], String, Boolean, String)

建立 以 CreateIndexOperation 建立新的複合(多欄)索引。

CreateIndex(String, String, String[], String, Boolean)

一個提供類似流暢 API 的建置者來建置 MigrationOperations。

CreateSequence(String, String, Int64, Int32, Nullable<Int64>, Nullable<Int64>, Boolean)

建立 a CreateSequenceOperation 以建立新的序列。

CreateSequence<T>(String, String, Int64, Int32, Nullable<Int64>, Nullable<Int64>, Boolean)

建立 a CreateSequenceOperation 以建立新的序列。

CreateTable<TColumns>(String, Func<ColumnsBuilder,TColumns>, String, Action<CreateTableBuilder<TColumns>>, String)

建立 a CreateTableOperation 以建立一個新的資料表。

CreateTable<TColumns>(String, Func<ColumnsBuilder,TColumns>, String, Action<CreateTableBuilder<TColumns>>)

建立並 CreateTableOperation 建立一個新的表格。

DeleteData(String, String, Object, String)

建立 a DeleteDataOperation 來刪除一列的種子資料。

DeleteData(String, String, Object[], String)

它會建立 DeleteDataOperation 一個來刪除多列種子資料的程式。

DeleteData(String, String, String, Object, String)

建立 a DeleteDataOperation 來刪除一列的種子資料。

DeleteData(String, String, String, Object[], String)

它會建立 DeleteDataOperation 一個來刪除多列種子資料的程式。

DeleteData(String, String[], Object[,], String)

建立一個 DeleteDataOperation 用來刪除多列種子資料的複合鍵(多欄鍵)資料表中的資料。

DeleteData(String, String[], Object[], String)

建立 A DeleteDataOperation ,從帶有複合(多欄)鍵的表格中刪除一列種子資料。

DeleteData(String, String[], String[], Object[,], String)

建立一個 DeleteDataOperation 用來刪除多列種子資料的複合鍵(多欄鍵)資料表中的資料。

DeleteData(String, String[], String[], Object[], String)

建立 A DeleteDataOperation ,從帶有複合(多欄)鍵的表格中刪除一列種子資料。

DropCheckConstraint(String, String, String)

建立一個 DropCheckConstraintOperation 來移除現有檢查約束的機制。

DropColumn(String, String, String)

建造 a DropColumnOperation 來降低現有的柱子。

DropForeignKey(String, String, String)

建立 a DropForeignKeyOperation 以捨棄現有的外鍵限制。

DropIndex(String, String, String)

建立 A DropIndexOperation 來刪除現有的指數。

DropPrimaryKey(String, String, String)

建立一個 DropPrimaryKeyOperation 要丟棄現有主鍵的 a。

DropSchema(String)

建置 A DropSchemaOperation 來丟棄現有的結構。

DropSequence(String, String)

建立一個 DropSequenceOperation 來刪除現有序列的程序。

DropTable(String, String)

建立 a DropTableOperation 來丟棄現有的表格。

DropUniqueConstraint(String, String, String)

建立 A DropUniqueConstraintOperation 以捨棄現有的唯一限制。

EnsureSchema(String)

建立 並 EnsureSchemaOperation 以確保結構的存在。

InsertData(String, String, Object, String)

建立 並 InsertDataOperation 插入單一欄位的種子資料值。

InsertData(String, String, Object[], String)

建立 並 InsertDataOperation 能為單一欄位插入多列種子資料值。

InsertData(String, String, String, Object, String)

建立 並 InsertDataOperation 插入單一欄位的種子資料值。

InsertData(String, String, String, Object[], String)

建立 並 InsertDataOperation 能為單一欄位插入多列種子資料值。

InsertData(String, String[], Object[,], String)

建立 並 InsertDataOperation 能為多個欄位插入多列的種子資料值。

InsertData(String, String[], Object[], String)

建立 並 InsertDataOperation 插入一列種子資料值。

InsertData(String, String[], String[], Object[,], String)

建立 並 InsertDataOperation 能為多個欄位插入多列的種子資料值。

InsertData(String, String[], String[], Object[], String)

建立 並 InsertDataOperation 插入一列種子資料值。

RenameColumn(String, String, String, String)

建造 a RenameColumnOperation 以重新命名現有的柱子。

RenameIndex(String, String, String, String)

建立一個 RenameIndexOperation 以重新命名現有索引。

RenameSequence(String, String, String, String)

建立 a RenameSequenceOperation 以重新命名現有序列。

RenameTable(String, String, String, String)

建立 a RenameTableOperation 來重新命名一個現有的資料表。

RestartSequence(String, Int64, String)

建立 a RestartSequenceOperation 以重新開始現有序列。

RestartSequence(String, Nullable<Int64>, String)

建立 a RestartSequenceOperation 以重新開始現有序列。

Sql(String, Boolean)

它會建置並 SqlOperation 執行原始 SQL。

UpdateData(String, String, Object, String, Object, String)

建立 並 UpdateDataOperation 更新單一列的種子資料。

UpdateData(String, String, Object, String[], Object[], String)

建立 並 UpdateDataOperation 更新單一列的種子資料。

UpdateData(String, String, Object[], String, Object[], String)

它能建立並 UpdateDataOperation 更新多列的種子資料。

UpdateData(String, String, Object[], String[], Object[,], String)

它能建立並 UpdateDataOperation 更新多列的種子資料。

UpdateData(String, String[], Object[,], String, Object[], String)

建立 並 UpdateDataOperation 更新多列種子資料,並使用複合(多欄)鍵。

UpdateData(String, String[], Object[,], String[], Object[,], String)

建立 並 UpdateDataOperation 更新多列種子資料,並使用複合(多欄)鍵。

UpdateData(String, String[], Object[], String, Object, String)

建立 並 UpdateDataOperation 更新具有複合(多欄)鍵的表格的單一列種子資料。

UpdateData(String, String[], Object[], String[], Object[], String)

建立 並 UpdateDataOperation 更新具有複合(多欄)鍵的表格的單一列種子資料。

UpdateData(String, String[], String[], Object[,], String[], String[], Object[,], String)

建立 並 UpdateDataOperation 更新多列種子資料,並使用複合(多欄)鍵。

UpdateData(String, String[], String[], Object[], String[], String[], Object[], String)

建立 並 UpdateDataOperation 更新具有複合(多欄)鍵的表格的單一列種子資料。

擴充方法

名稱 Description
IsSqlite(MigrationBuilder)

如果目前使用的資料庫提供者是 SQLite 提供者,則回傳 true 。

IsSqlServer(MigrationBuilder)

如果目前使用的資料庫提供者是 SQL Server 提供者,則回傳true。

適用於