public IHttpActionResult Delete(int id) { bool removed = _fruitRepository.DeleteFruitbool(id); if (!removed) { // CustomError error = new CustomError { Id = 400, Description = "Item not found" }; // return ResponseMessage(Request.CreateResponse(HttpStatusCode.NotFound, error)); return(ResponseMessage(Request.CreateResponse(HttpStatusCode.NotFound))); } return(Ok()); }