Пример #1
0
        public IActionResult Index()
        {
            HomeViewModel homeViewModel = new HomeViewModel()
            {
                TotalTrainers    = _trainerService.Count(),
                TotalStudents    = _studentService.Count(),
                TotalLessons     = _lessonService.Count(),
                YesterdayLessons = _lessonService.GetByDate(DateTime.UtcNow.AddDays(-1)).Data,
                TodayLessons     = _lessonService.GetByDate(DateTime.UtcNow).Data
            };

            return(View(homeViewModel));
        }