語言

ModelSnapshot 類別

定義

由遷移產生的狀態快照 IModel 的基底類別。

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

備註

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

建構函式

名稱 Description
ModelSnapshot()

建立一個新的快照實例。

屬性

名稱 Description
LastMigrationId

最新遷移的 ID 在快照建立時套用到模型上。

Model

快照模型。

方法

名稱 Description
BuildModel(ModelBuilder)

第一次被請求時,我會懶散地呼叫來 Model 建立模型快照。

適用於