共用方式為


MigratorScriptingDecorator 類別

定義

裝飾專案,以產生 SQL 腳本,而不是將變更套用至資料庫。 使用此裝飾專案包裝 DbMigrator 可防止 DbMigrator 將任何變更套用至目標資料庫。

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

建構函式

MigratorScriptingDecorator(MigratorBase)

初始化 MigratorScriptingDecorator 類別的新實例。

屬性

Configuration

取得用於移轉程式的組態。

(繼承來源 MigratorBase)

方法

GetDatabaseMigrations()

取得已套用至資料庫的移轉清單。

(繼承來源 MigratorBase)
GetLocalMigrations()

取得元件中定義的移轉清單。

(繼承來源 MigratorBase)
GetPendingMigrations()

取得尚未套用至資料庫的暫止移轉清單。

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

產生腳本以更新資料庫。

Update()

更新目標資料庫到最新的移轉。

(繼承來源 MigratorBase)
Update(String)

更新目標資料庫至指定的移轉。

(繼承來源 MigratorBase)

適用於