共用方式為


RelationalLoggerExtensions.MigrationGeneratingUpScript 方法

定義

MigrationGeneratingUpScript事件的記錄。

public static void MigrationGeneratingUpScript (this Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Migrations> diagnostics, Microsoft.EntityFrameworkCore.Migrations.IMigrator migrator, Microsoft.EntityFrameworkCore.Migrations.Migration migration, string fromMigration, string toMigration, bool idempotent);
public static void MigrationGeneratingUpScript (this Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Migrations> diagnostics, Microsoft.EntityFrameworkCore.Migrations.IMigrator migrator, Microsoft.EntityFrameworkCore.Migrations.Migration migration, string? fromMigration, string? toMigration, bool idempotent);
static member MigrationGeneratingUpScript : Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Migrations> * Microsoft.EntityFrameworkCore.Migrations.IMigrator * Microsoft.EntityFrameworkCore.Migrations.Migration * string * string * bool -> unit
<Extension()>
Public Sub MigrationGeneratingUpScript (diagnostics As IDiagnosticsLogger(Of DbLoggerCategory.Migrations), migrator As IMigrator, migration As Migration, fromMigration As String, toMigration As String, idempotent As Boolean)

參數

diagnostics
IDiagnosticsLogger<DbLoggerCategory.Migrations>

要使用的診斷記錄器。

migrator
IMigrator

移轉程式。

migration
Migration

移轉。

fromMigration
String

開始移轉名稱。

toMigration
String

結束移轉名稱。

idempotent
Boolean

指出是否產生等冪腳本。

適用於