Skip to content

Disable identity column generation for the entire model #3723

Description

@nandor23

Currently, there are methods to configure identity generation strategy globally (e.g. UseIdentityColumns(), UseIdentityAlwaysColumns()), which control whether the database generates values automatically or allows user-provided values. However, there's no way to disable database generation entirely and require that all identity values must be provided by the application.

It would be helpful to have a method like:

protected override void OnModelCreating(ModelBuilder modelBuilder)
    => modelBuilder.UseNoIdentityGeneration();

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions