IMigrationsSqlGenerator.Generate 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
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)
- Source:
- IMigrationsSqlGenerator.cs
- Source:
- IMigrationsSqlGenerator.cs
- Source:
- 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
生成命令时要使用的选项。
返回
要执行或编写脚本的命令列表。