public ActionResult Manage(Adm adm) { var actionName = nameof(Index); try { _admBusiness.SaveAndReturn(adm); } catch (Exception ex) { TempData[nameof(Adm)] = adm; TempData[Constants.ERROR] = ex.Message; actionName = nameof(Manage); } return(RedirectToAction(actionName, "Adm")); }
private void ValidateAndSave(Adm adm) { _personBusiness.ValidadePerson(adm.Person); _admBusiness.SaveAndReturn(adm); }