public ActionResult DeleteItemCategory(int id) { if (Request.IsAuthenticated) { string errMsg = ""; ItemRepo itemRepo = new ItemRepo(); itemRepo.DeleteItemCategory(id, out errMsg); TempData["ItemCategoryActionMsg"] = errMsg; return(RedirectToAction("ItemCategoryManagement")); } else { return(RedirectToAction("Login", "Home")); } }