Migration 類別

定義

每個 EF Core 移轉所繼承的基類。

public abstract class Migration
type Migration = class
Public MustInherit Class Migration
繼承
Migration

備註

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

建構函式

名稱 Description
Migration()

建立 Migration 執行個體。

欄位

名稱 Description
InitialDatabase

空資料庫的移轉識別碼。

屬性

名稱 Description
ActiveProvider

目前資料庫提供者的名稱。

DownOperations

MigrationOperation 移轉資料庫 'down' 的 。

TargetModel

資料庫 IModel 在套用移轉之後將對應的 。

UpOperations

MigrationOperation 移轉資料庫 'up' 的 。

方法

名稱 Description
BuildTargetModel(ModelBuilder)

實作 以建置 TargetModel

Down(MigrationBuilder)

建置將移轉資料庫「關閉」的作業。

Up(MigrationBuilder)

建置將移轉資料庫 'up' 的作業。

適用於