Code is simple. Tag.cs entity:
Tag.cs
public partial class Tag { [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int Id { ge
According to the Postgre SQL docs here is an example which shows how to achieve the desired result:
protected override void OnModelCreating(ModelBuilder modelBuilder) => modelBuilder.Entity().Property(b => b.Id).UseIdentityAlwaysColumn();