public ActionResult Edit(TitleVM model) { try { string titleId = string.Empty; model.UpdatedBy = LogInManager.LoggedInUserId; titleId = titleRepository.UpdateTitle(model); if (!string.IsNullOrWhiteSpace(titleId)) { return(Json(new { IsSuccess = true, data = new { TitleId = titleId } }, JsonRequestBehavior.AllowGet)); } else { return(Json(new { IsSuccess = false, errorMessage = "Title details not updated successfully." }, JsonRequestBehavior.AllowGet)); } } catch (Exception e) { Utility.Utility.LogError(e, "Edit"); return(Json(new { IsSuccess = false, errorMessage = e.Message })); } }