Files
AlquilaFacil/Modelo/RepositorioLogs.cs

19 lines
601 B
C#

using System.Linq;
using Entidades;
using Microsoft.EntityFrameworkCore;
namespace Modelo;
public class RepositorioLogs: RepositorioBase<RepositorioLogs> {
public ICollection<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;
}
public IQueryable<Log>? ObtenerLogsPaginado(int pag) {
var con = Context;
var l = con.Logs.Skip(10*pag).Take(10);
return l;
}
}