public ActionResult Add(Update updateData) { if (updateData == null) { return(View("Error")); } if (!User.Identity.IsAuthenticated) { return(View("Error")); } _updateRepository.AddNew(updateData); return(RedirectToAction("Index")); }