0
I have a table mapped for Postgre, but when I update the database, the Personal Fieldphysicaenderecotipoid is being auto-incremented by 10 in 10 (by default). How do I map so that Incrementby is set to auto-increment 1 in 1?
Mapping of the table:
public class PessoaFisicaEnderecoTipoMap : IEntityTypeConfiguration<PessoaFisicaEnderecoTipo>
{
public void Configure(EntityTypeBuilder<PessoaFisicaEnderecoTipo> builder)
{
builder.ToTable("PessoaFisicaEnderecoTipo");
builder.HasKey(pfet => pfet.Id);
builder.Property(pfet => pfet.Id)
.HasColumnName("PessoaFisicaEnderecoTipoId")
.ForNpgsqlUseSequenceHiLo()
.IsRequired();
builder.Property(pfet => pfet.Descricao)
.HasColumnName("Descricao")
.HasColumnType("character varying(50)")
.IsRequired();
builder.Property(pfet => pfet.PadraoSistema)
.HasColumnName("PadraoSistema")
.HasColumnType("boolean");
}
}
https://www.npgsql.org/efcore/value-generation.html and an explanation here: https://github.com/npgsql/Npgsql.EntityFrameworkCore.PostgreSQL/issues/336 read and then speak to me!
– novic