lucas me pidio las lineas de codigo
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user