public ActionResult Create(MembersViewModel model) { try { if (model == null) { return(RedirectToAction(nameof(ErrorMessage))); } bool result = _MembersService.AddMembers(model); if (result) { Alert("Congratulations", "New member successfully added!", NotificationType.success); } return(RedirectToAction(nameof(Index))); throw new Exception(); } catch { return(View()); } }