IMigrationsCodeGenerator.GenerateMigration Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Generates the migration code.
public 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 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 Function GenerateMigration (migrationNamespace As String, migrationName As String, upOperations As IReadOnlyList(Of MigrationOperation), downOperations As IReadOnlyList(Of MigrationOperation)) As String
Parameters
- migrationNamespace
- String
The migration's namespace.
- migrationName
- String
The migration's name.
- upOperations
- IReadOnlyList<MigrationOperation>
The migration's up operations.
- downOperations
- IReadOnlyList<MigrationOperation>
The migration's down operations.
Returns
The migration code.
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Entity Framework