Exemplo n.º 1
0
        public ActionResult Edit(RegionViewModel regionViewModel)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    regionViewModel.Region = regionViewModel.Region.Trim();
                    regionViewModel.UpdateRegion(regionViewModel);
                    return(RedirectToAction("Index", "Region"));
                }

                return(View(regionViewModel));
            }
            catch (Exception ex)
            {
                errorlogviewmodel = new ErrorLogViewModel();
                errorlogviewmodel.LogError(ex);
                return(View("Error"));
            }
        }