共用方式為


IMigrationsSqlGenerator.Generate 方法

定義

多載

Generate(IReadOnlyList<MigrationOperation>, IModel)

從作業清單產生命令。

Generate(IReadOnlyList<MigrationOperation>, IModel, MigrationsSqlGenerationOptions)

從作業清單產生命令。

Generate(IReadOnlyList<MigrationOperation>, IModel)

從作業清單產生命令。

public System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Migrations.MigrationCommand> Generate (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation> operations, Microsoft.EntityFrameworkCore.Metadata.IModel model = default);
abstract member Generate : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation> * Microsoft.EntityFrameworkCore.Metadata.IModel -> System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Migrations.MigrationCommand>
Public Function Generate (operations As IReadOnlyList(Of MigrationOperation), Optional model As IModel = Nothing) As IReadOnlyList(Of MigrationCommand)

參數

operations
IReadOnlyList<MigrationOperation>

作業。

model
IModel

目標模型,如果作業不存在模型,則可能 null 是。

傳回

要執行或編寫腳本的命令清單。

適用於

Generate(IReadOnlyList<MigrationOperation>, IModel, MigrationsSqlGenerationOptions)

來源:
IMigrationsSqlGenerator.cs
來源:
IMigrationsSqlGenerator.cs
來源:
IMigrationsSqlGenerator.cs

從作業清單產生命令。

public System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Migrations.MigrationCommand> Generate (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation> operations, Microsoft.EntityFrameworkCore.Metadata.IModel model = default, Microsoft.EntityFrameworkCore.Migrations.MigrationsSqlGenerationOptions options = Microsoft.EntityFrameworkCore.Migrations.MigrationsSqlGenerationOptions.Default);
public System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Migrations.MigrationCommand> Generate (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation> operations, Microsoft.EntityFrameworkCore.Metadata.IModel? model = default, Microsoft.EntityFrameworkCore.Migrations.MigrationsSqlGenerationOptions options = Microsoft.EntityFrameworkCore.Migrations.MigrationsSqlGenerationOptions.Default);
abstract member Generate : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation> * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationsSqlGenerationOptions -> System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Migrations.MigrationCommand>
Public Function Generate (operations As IReadOnlyList(Of MigrationOperation), Optional model As IModel = Nothing, Optional options As MigrationsSqlGenerationOptions = Microsoft.EntityFrameworkCore.Migrations.MigrationsSqlGenerationOptions.Default) As IReadOnlyList(Of MigrationCommand)

參數

operations
IReadOnlyList<MigrationOperation>

作業。

model
IModel

目標模型,如果作業不存在模型,則可能 null 是。

options
MigrationsSqlGenerationOptions

產生命令時要使用的選項。

傳回

要執行或編寫腳本的命令清單。

適用於