public ActionResult Create(RemoteEndpointSetting setting, string @return)
 {
     var resultEntry = new JsonResultData(ModelState);
     if (ModelState.IsValid)
     {
         resultEntry.RunWithTry((data) =>
         {
             _manager.Add(setting);
             data.RedirectUrl = @return;
         });
     }
     return Json(resultEntry);
 }
 public ActionResult Edit(RemoteEndpointSetting setting, string @return)
 {
     var resultEntry = new JsonResultData(ModelState);
     if (ModelState.IsValid)
     {
         resultEntry.RunWithTry((data) =>
         {
             var oldModel = _manager.Get(setting.UUID);
             _manager.Update(setting, oldModel);
             resultEntry.RedirectUrl = @return;
         });
     }
     return Json(resultEntry);
 }
 public ActionResult Create()
 {
     var model = new RemoteEndpointSetting();
     model.Enabled = true;
     return View(model);
 }