共用方式為


MigrationsCodeGenerator.GenerateMigration 方法

定義

產生移轉程式碼。

public abstract string GenerateMigration (string migrationNamespace, string migrationName, System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation> upOperations, System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation> downOperations);
public abstract string GenerateMigration (string? migrationNamespace, string migrationName, System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation> upOperations, System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation> downOperations);
abstract member GenerateMigration : string * string * System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation> * System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation> -> string
Public MustOverride Function GenerateMigration (migrationNamespace As String, migrationName As String, upOperations As IReadOnlyList(Of MigrationOperation), downOperations As IReadOnlyList(Of MigrationOperation)) As String

參數

migrationNamespace
String

移轉的命名空間。

migrationName
String

移轉的名稱。

upOperations
IReadOnlyList<MigrationOperation>

移轉的啟動作業。

downOperations
IReadOnlyList<MigrationOperation>

移轉的關閉作業。

傳回

移轉程式碼。

實作

適用於