api para obtener datos de los logs
This commit is contained in:
19
Modelo/RepositorioLogs.cs
Normal file
19
Modelo/RepositorioLogs.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user