Example #1
0
        public ActionResult Create(StatusCreateViewModel model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }
            var result = _statusProvider.AddStatus(model);

            if (result == StatusResult.Success)
            {
                return(RedirectToAction("Index"));
            }
            ModelState.AddModelError("", "Something went wrong");
            return(View(model));
        }