// GET: Manager public async Task <IActionResult> Index() { try { if (int.Parse(HttpContext.Session.GetString("UserRoleId")) != 2) /*not authentication test*/ { return(RedirectToAction("Login", "Home")); } else { var emptasks = iemptaskservice.GetById(int.Parse(HttpContext.Session.GetString("UserId"))); return(View(emptasks)); } } catch { return(RedirectToAction("Login", "Home")); } }