MigrationsSqlGenerator.UniqueConstraint 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
为 的唯一约束 AddUniqueConstraintOperation生成 SQL 片段。
protected virtual void UniqueConstraint (Microsoft.EntityFrameworkCore.Migrations.Operations.AddUniqueConstraintOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
protected virtual void UniqueConstraint (Microsoft.EntityFrameworkCore.Migrations.Operations.AddUniqueConstraintOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
abstract member UniqueConstraint : Microsoft.EntityFrameworkCore.Migrations.Operations.AddUniqueConstraintOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
override this.UniqueConstraint : Microsoft.EntityFrameworkCore.Migrations.Operations.AddUniqueConstraintOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overridable Sub UniqueConstraint (operation As AddUniqueConstraintOperation, model As IModel, builder As MigrationCommandListBuilder)
参数
- operation
- AddUniqueConstraintOperation
操作。
- model
- IModel
如果不存在模型的操作,则 null
为 的目标模型。
- builder
- MigrationCommandListBuilder
用于添加 SQL 片段的命令生成器。