public ActionResult Edit(ModeratorEditViewModel model) { bool succeeded = false; if (ModelState.IsValid) { ModeratorEditDTO moderatorDTO = Mapper.Map <ModeratorEditViewModel, ModeratorEditDTO>(model); ServiceMessage serviceMessage = service.Edit(moderatorDTO); if (!serviceMessage.Succeeded) { AddModelErrors(serviceMessage.Errors); } succeeded = serviceMessage.Succeeded; } return(JsonOnFormPost(succeeded, "~/Views/Moderator/Edit.cshtml", model)); }