Ejemplo n.º 1
0
        public ActionResult CreateAccount(Person model)
        {
            var actionName = nameof(Index);

            try
            {
                _personBusiness.SaveAndReturn(model);
            }
            catch (Exception ex)
            {
                actionName = nameof(CreateAccount);
                TempData[Constants.ERROR] = ex.Message;
                TempData[nameof(Person)]  = model;
            }

            return(RedirectToAction(actionName, "Login"));
        }