Fix proyeccion bancas

This commit is contained in:
2025-08-23 12:27:27 -03:00
parent 8bb8a5dede
commit 303a469c57
12 changed files with 457 additions and 36 deletions

View File

@@ -51,5 +51,11 @@ public class EleccionesDbContext(DbContextOptions<EleccionesDbContext> options)
entity.Property(e => e.MesasTotalizadasPorcentaje).HasPrecision(5, 2);
entity.Property(e => e.ParticipacionPorcentaje).HasPrecision(5, 2);
});
modelBuilder.Entity<ProyeccionBanca>(entity =>
{
// La combinación de ámbito, categoría y agrupación debe ser única.
entity.HasIndex(p => new { p.AmbitoGeograficoId, p.CategoriaId, p.AgrupacionPoliticaId })
.IsUnique();
});
}
}