CSharpMigrationsGenerator.GenerateMigration 方法

定义

生成迁移代码。

public override 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 override 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);
override this.GenerateMigration : string * string * System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation> * System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation> -> string
Public Overrides 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>

迁移的向下操作。

返回

迁移代码。

适用于