Share via


IMigrationsSqlGenerator.Generate Method

Definition

Overloads

Generate(IReadOnlyList<MigrationOperation>, IModel)

Generates commands from a list of operations.

Generate(IReadOnlyList<MigrationOperation>, IModel, MigrationsSqlGenerationOptions)

Generates commands from a list of operations.

Generate(IReadOnlyList<MigrationOperation>, IModel)

Generates commands from a list of operations.

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)

Parameters

operations
IReadOnlyList<MigrationOperation>

The operations.

model
IModel

The target model which may be null if the operations exist without a model.

Returns

The list of commands to be executed or scripted.

Applies to

Generate(IReadOnlyList<MigrationOperation>, IModel, MigrationsSqlGenerationOptions)

Generates commands from a list of operations.

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)

Parameters

operations
IReadOnlyList<MigrationOperation>

The operations.

model
IModel

The target model which may be null if the operations exist without a model.

options
MigrationsSqlGenerationOptions

The options to use when generating commands.

Returns

The list of commands to be executed or scripted.

Applies to