Esempio n. 1
0
 public static List <Tv> ListarTv(int bloqueId)
 {
     using (var db = new COLASEntities())
     {
         return(db.Tv.Where(x => x.BloqueId == bloqueId)
                .OrderByDescending(x => x.Fecha).Take(4).ToList());
     }
 }
Esempio n. 2
0
 public static Cola LlamarCola(int servicioId)
 {
     using (var db = new COLASEntities())
     {
         return(db.Cola.Where(x => x.ServicioId == servicioId && x.IndAtendido == false &&
                              x.Fecha.Year == DateTime.Now.Year &&
                              x.Fecha.Month == DateTime.Now.Month &&
                              x.Fecha.Day == DateTime.Now.Day).OrderBy(x => x.Fecha).FirstOrDefault());
     }
 }