public async Task <IActionResult> Index() { var access_token = CookieEncoder.DecodeToken(Request.Cookies["access_token_cookie"]); var users = await _userManage.GetNumberOfUsers(access_token); var categories = await _cateManage.GetAll(); var exams = await _examManage.GetAll(access_token); var questions = await _quesManage.GetNumberQuestion(access_token); ViewBag.TotalExam = exams.data.Count(); ViewBag.TotalQuestion = questions.data; if (users != null && categories != null) { if (users.msg != null) { ViewBag.Error = users.msg; } ViewBag.TotalUser = users.data; ViewBag.TotalCategory = categories.data.Count; } return(View()); }