public ActionResult ManageNurses(NurseModel nurseUpdates) { if (Convert.ToString(Session["key"]) != "admin") { return(RedirectToAction("Login", "Home")); } Admin_Api adminApi = new Admin_Api(); var model = adminApi.UpdateNurse(nurseUpdates); if (model != null) { return(View("~/Views/Administrator/AdminViewNurses.cshtml", model)); } return(View("~/Views/Error.cshtml")); }