public ActionResult Create(StatusVM model) { string msg = ""; if (ModelState.IsValid) { bool success = _sRepo.AddStatus(model, out msg); if (success) { TempData["SuccessMsg"] = msg; return(RedirectToAction("index")); } else { TempData["ErrorMsg"] = msg; } } else { TempData["ErrorMsg"] = "Status cannot be added at this time."; } model.StatusTypeList = _lRepo.GetStatusTypeList(); return(View(model)); }