Feat Widgets

- Widget de Home
- Widget Cards por Provincias
- Widget Mapa por Categorias
This commit is contained in:
2025-10-01 10:03:01 -03:00
parent 3b0eee25e6
commit a985cbfd7c
45 changed files with 1786 additions and 953 deletions

View File

@@ -30,6 +30,13 @@ public class EleccionesDbContext(DbContextOptions<EleccionesDbContext> options)
modelBuilder.UseCollation("Modern_Spanish_CI_AS");
modelBuilder.Entity<Eleccion>(entity =>
{
// Le decimos a EF que proporcionaremos el valor de la clave primaria.
// Esto evita que la configure como una columna IDENTITY en SQL Server.
entity.Property(e => e.Id).ValueGeneratedNever();
});
modelBuilder.Entity<ResultadoVoto>()
.HasIndex(r => new { r.AmbitoGeograficoId, r.CategoriaId, r.AgrupacionPoliticaId })
.IsUnique();