// DELETE: api/CustomerCategory/5 public IHttpActionResult Delete(int id) { var returnSale = service.EndSale(id); if (returnSale == null) { return(BadRequest("Sale not found.")); } return(Ok(returnSale)); }