1
I am unable to activate the Auto_increment of the Contactotype field in Postgre. In the table mapping I specified the "Valuegeneratedonadd" resource, but when I update the database with Migrations, nothing changes. When I try to enter a record in the Application it gives error because the field is not being incremented. Does anyone know how to help me?
A hug to all!
public class Contatotipomap : Ientitytypeconfiguration { public void Configure(Entitytypebuilder Builder) { Builder.Totable("Contact type");
        builder.HasKey(ct => new { ct.Id });
        builder.Property(ct => ct.Id)
             .ValueGeneratedOnAdd()
            .IsRequired();
        builder.Property(ct => ct.Id)
            .HasColumnName("ContatoTipoId")
            .HasColumnType("integer")
            .IsRequired();
        builder.Property(ct => ct.Descricao)
           .HasColumnName("Descricao")
           .HasColumnType("character varying(50)")
           .IsRequired();
        builder.Property(ct => ct.PadraoSistema)
          .HasColumnName("PadraoSistema")
          .HasColumnType("boolean");
    }
}
						