public ActionResult EditShip(ShipDTO ship) { return(HttpHandleExtensions.AjaxCallGetResult(() => { if (ship.Id == Guid.Empty) { ship.CreatorId = GetCurrentUser().UserId; _shipService.Add(ship); this.JsMessage = MessagesResources.Add_Success; } else { _shipService.Update(ship); this.JsMessage = MessagesResources.Update_Success; } return Json(new AjaxResponse { Succeeded = true, RedirectUrl = Url.Action("Index") }); })); }