// DELETE api/credit/5 public IHttpActionResult Delete(int id) { try { creditService.Delete(id); return(Ok()); } catch (BankClientException ex) { return(BadRequest(ex.Message)); } catch (Exception ex) { return(InternalServerError(ex)); } }