public ActionResult EditItemCategory(int id) { if (Request.IsAuthenticated) { ItemRepo itemRepo = new ItemRepo(); ItemCategoryVM itemCategory = itemRepo.GetCategoryDetails(id); return(View(itemCategory)); } else { return(RedirectToAction("Login", "Home")); } }