public Hobby Update(Hobby hobby) { using (var svc = new ServiceProxyHelper<IHobbyService>("HobbyService")) { return svc.Proxy.Update(hobby); } }
public Hobby Update(Hobby hobby) { try { return HobbyMapper.ToDto(_hobbyRepository.Edit(HobbyMapper.ToEntity(hobby))); } catch (Exception ex) { throw new BlogException(ex.Message, ex.InnerException); } }
public ActionResult Edit(Hobby hobby) { try { if (!ModelState.IsValid) { return Json(GetErrorList(ModelState)); } var result = _hobbyResource.Update(hobby); if (result.Error != null) throw new Exception(result.Error.Message); return Json(result); } catch (Exception ex) { Response.StatusCode = 400; _errorSignaler.SignalFromCurrentContext(ex); return Json(hobby); } }
public IHttpActionResult Put([FromBody]Hobby hobby) { try { if (!ModelState.IsValid) { return BadRequest(ModelState); } var result = _service.Update(hobby); return Ok(result); } catch (Exception ex) { _errorSignaler.SignalFromCurrentContext(ex); var errorResult = new Hobby().GenerateError<Hobby>((int)Constants.Error.InternalError, "Server technical error"); return Ok(errorResult); } }
public Hobby Update(Hobby hobby) { return _hobbyLogic.Update(hobby); }
public Hobby Add(Hobby hobby) { return _hobbyLogic.Add(hobby); }
public Hobby Update(Hobby hobby, string authenticationToken) { throw new System.NotImplementedException(); }