MigrationsSqlGenerator.PrimaryKeyConstraint Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Generates a SQL fragment for a primary key constraint of an AddPrimaryKeyOperation.
protected virtual void PrimaryKeyConstraint (Microsoft.EntityFrameworkCore.Migrations.Operations.AddPrimaryKeyOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
protected virtual void PrimaryKeyConstraint (Microsoft.EntityFrameworkCore.Migrations.Operations.AddPrimaryKeyOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
abstract member PrimaryKeyConstraint : Microsoft.EntityFrameworkCore.Migrations.Operations.AddPrimaryKeyOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
override this.PrimaryKeyConstraint : Microsoft.EntityFrameworkCore.Migrations.Operations.AddPrimaryKeyOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overridable Sub PrimaryKeyConstraint (operation As AddPrimaryKeyOperation, model As IModel, builder As MigrationCommandListBuilder)
Parameters
- operation
- AddPrimaryKeyOperation
The operation.
- model
- IModel
The target model which may be null
if the operations exist without a model.
- builder
- MigrationCommandListBuilder
The command builder to use to add the SQL fragment.
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Entity Framework