語言

MigratorScriptingDecorator 類別

定義

Decorator 用來產生 SQL 腳本,而不是對資料庫套用變更。 使用這個裝飾器來包裝 DbMigrator ,可以防止 DbMigrator 對目標資料庫套用任何變更。

public class MigratorScriptingDecorator : System.Data.Entity.Migrations.Infrastructure.MigratorBase
type MigratorScriptingDecorator = class
    inherit MigratorBase
Public Class MigratorScriptingDecorator
Inherits MigratorBase
繼承
MigratorScriptingDecorator

建構函式

名稱 Description
MigratorScriptingDecorator(MigratorBase)

初始化一個新的 MigratorScriptingDecorator 類別實例。

屬性

名稱 Description
Configuration

取得用於遷移流程的設定。

(繼承來源 MigratorBase)

方法

名稱 Description
GetDatabaseMigrations()

會取得已套用到資料庫的遷移清單。

(繼承來源 MigratorBase)
GetLocalMigrations()

會獲得 assembly 中定義的遷移清單。

(繼承來源 MigratorBase)
GetPendingMigrations()

會取得尚未套用到資料庫的待處理遷移清單。

(繼承來源 MigratorBase)
ScriptUpdate(String, String)

產生一個腳本來更新資料庫。

Update()

更新目標資料庫至最新遷移。

(繼承來源 MigratorBase)
Update(String)

更新目標資料庫至特定遷移地點。

(繼承來源 MigratorBase)

適用於