lucas me pidio las lineas de codigo

This commit is contained in:
2025-01-29 01:59:16 -03:00
parent c7880b03b3
commit 72f277ab6c
14 changed files with 289 additions and 44 deletions

View File

@@ -4,11 +4,21 @@ using Microsoft.EntityFrameworkCore;
namespace Modelo;
public class RepositorioLogs: RepositorioBase<RepositorioLogs> {
public ICollection<LogDetalle> ObtenerDetallesLogs(DateTime fecha, long idusuario) {
public int ObtenerCantidadPaginas() {
var con = Context;
float a = con.Logs.Count()/10f;
int b = (int)a;
if (b != a){
b++;
}
return b;
}
public IOrderedEnumerable<LogDetalle> ObtenerDetallesLogs(DateTime fecha, long idusuario) {
var con = Context;
var d = con.Logs.Include(x=>x.LogDetalles)
.FirstOrDefault(x => x.Fecha == fecha && x.Dniusuario == idusuario);
return d.LogDetalles;
return d.LogDetalles.OrderBy(x=>x.Id);
}
public IQueryable<Log>? ObtenerLogsPaginado(int pag) {