ValueGenerationConvention.ProcessEntityTypePrimaryKeyChanged Method

Definition

Called after the primary key for an entity type is changed.

public virtual void ProcessEntityTypePrimaryKeyChanged (Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder entityTypeBuilder, Microsoft.EntityFrameworkCore.Metadata.IConventionKey newPrimaryKey, Microsoft.EntityFrameworkCore.Metadata.IConventionKey previousPrimaryKey, Microsoft.EntityFrameworkCore.Metadata.Conventions.IConventionContext<Microsoft.EntityFrameworkCore.Metadata.IConventionKey> context);
public virtual void ProcessEntityTypePrimaryKeyChanged (Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder entityTypeBuilder, Microsoft.EntityFrameworkCore.Metadata.IConventionKey? newPrimaryKey, Microsoft.EntityFrameworkCore.Metadata.IConventionKey? previousPrimaryKey, Microsoft.EntityFrameworkCore.Metadata.Conventions.IConventionContext<Microsoft.EntityFrameworkCore.Metadata.IConventionKey> context);
abstract member ProcessEntityTypePrimaryKeyChanged : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder * Microsoft.EntityFrameworkCore.Metadata.IConventionKey * Microsoft.EntityFrameworkCore.Metadata.IConventionKey * Microsoft.EntityFrameworkCore.Metadata.Conventions.IConventionContext<Microsoft.EntityFrameworkCore.Metadata.IConventionKey> -> unit
override this.ProcessEntityTypePrimaryKeyChanged : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder * Microsoft.EntityFrameworkCore.Metadata.IConventionKey * Microsoft.EntityFrameworkCore.Metadata.IConventionKey * Microsoft.EntityFrameworkCore.Metadata.Conventions.IConventionContext<Microsoft.EntityFrameworkCore.Metadata.IConventionKey> -> unit
Public Overridable Sub ProcessEntityTypePrimaryKeyChanged (entityTypeBuilder As IConventionEntityTypeBuilder, newPrimaryKey As IConventionKey, previousPrimaryKey As IConventionKey, context As IConventionContext(Of IConventionKey))

Parameters

entityTypeBuilder
IConventionEntityTypeBuilder

The builder for the entity type.

newPrimaryKey
IConventionKey

The new primary key.

previousPrimaryKey
IConventionKey

The old primary key.

context
IConventionContext<IConventionKey>

Additional information associated with convention execution.

Implements

Applies to