public IHttpActionResult Delete(int id) { try { var invFound = _invoices.Delete(id); if (!invFound) { return(NotFound()); } return(Ok()); } catch (Exception ex) { return(BadRequest(ex.Message)); } }