MigrationsCodeGenerator.GenerateMigration 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
產生移轉程式碼。
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>
移轉的關閉作業。
傳回
移轉程式碼。