public ActionResult Edit(CreateEditViewModel model) { var region = regionProvider.GetRegion(model.Id); Mapper.DynamicMap(model, region); regionProvider.UpdateRegion(region); var jsonViewModel = new AjaxViewModel(true, model, null); return(Json(jsonViewModel)); }
public ActionResult Edit(CreateEditViewModel model) { var region = new DataAccess.Region(); mapper.Map(model, region); try { regionProvider.UpdateRegion(region); } catch (Exception ex) { return(HandleException(ex)); } var jsonViewModel = new AjaxViewModel(true, model, null); return(Json(jsonViewModel)); }