ForeignKeyPropertyDiscoveryConvention.ProcessEntityTypePrimaryKeyChanged 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.
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
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