// GET: ReservationController public async Task <ActionResult> History() { ViewBag.List = Utile.StatusToList(); var list = await _context.Reservations .Include(t => t.Reserv) .Include(s => s.Student) .OrderBy(r => r.Date) .ToListAsync(); return(View(list)); }
// GET: ReservationController public async Task <ActionResult> Index() { ViewBag.List = Utile.StatusToList(); var list = await _context.Reservations .Include(t => t.Reserv) .Include(s => s.Student) .OrderBy(r => r.Date) .Where(r => r.Status == Status.Attente.ToString()) .ToListAsync(); return(View("Index", list)); }