예제 #1
0
        // GET: Shifts
        public async Task <IActionResult> Index()
        {
            var user = await _userManager.GetUserAsync(HttpContext.User);

            var shifts = await _context.Shifts.Where(s => s.User == user).OrderByDescending(s => s.Start.Date)
                         .ToListAsync();

            ViewData["AverageTips"] = _shiftService.GetAverageTips(shifts);

            return(View(shifts));
        }