語言

IMigrationsSqlGenerator 介面

定義

一種用於產生 MigrationCommand 物件的服務,這些物件可從 s 清單 MigrationOperation中執行或以腳本形式執行。

public interface IMigrationsSqlGenerator
type IMigrationsSqlGenerator = interface
Public Interface IMigrationsSqlGenerator
衍生

備註

服役期間為 Scoped。 這表示每個 DbContext 實例都會使用自己的服務實例。 實作方式可能取決於其他註冊於任何生命週期的服務。 實作不需要執行緒安全。

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

方法

名稱 Description
Generate(IReadOnlyList<MigrationOperation>, IModel, MigrationsSqlGenerationOptions)

從操作清單產生指令。

Generate(IReadOnlyList<MigrationOperation>, IModel)

從操作清單產生指令。

適用於