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>

迁移的 up 操作。

downOperations
IReadOnlyList<MigrationOperation>

迁移的关闭操作。

返回

迁移代码。

实现

适用于