// PUT api/credit/5 public IHttpActionResult Put(int id, [FromBody] CreditBindingModel creditModel) { try { var credit = Mapper.Map <DomainCredit>(creditModel); credit.Id = id; creditService.Update(credit); return(Ok()); } catch (BankClientException ex) { return(BadRequest(ex.Message)); } catch (Exception ex) { return(InternalServerError(ex)); } }