avances añadido listado de clientes y sus grupos

This commit is contained in:
2024-12-31 01:53:49 -03:00
parent bb860b1a16
commit f1c9632855
14 changed files with 266 additions and 20 deletions
+11 -4
View File
@@ -1,6 +1,5 @@
#if DEBUG
using Entidades;
using Entidades.Admin;
using Microsoft.EntityFrameworkCore;
namespace Modelo;
@@ -23,6 +22,14 @@ public class RepositorioGrupos: RepositorioBase<RepositorioGrupos> {
var con = Context;
return con.Grupos.Where(x=>x.Nombre == grupo).SelectMany(x => x.Idpermisos);
}
}
#endif
public IQueryable<GrupoAdmin> ObtenerGruposPorDni(long Dni) {
var con = Context;
var grupos = con.Clientes.Where(x=>x.Dni == Dni).SelectMany(x=>x.Idgrupos)
.Select(x=> new GrupoAdmin{
Id = x.Id,
Descripcion = x.Nombre,
});
return grupos;
}
}