// DELETE: api/Items/5 public HttpResponseMessage Delete(int Id) { var message = Request.CreateErrorResponse(HttpStatusCode.NotFound, "No Such Data Exist"); var get = _itemApplication.Delete(Id); if (get) { message = Request.CreateResponse(HttpStatusCode.OK, "Data has successfully deleted"); return(message); } return(message); }
// DELETE: api/Items/5 public HttpResponseMessage Delete(int id) { var message = Request.CreateErrorResponse(HttpStatusCode.BadRequest, "No Such Data Exist"); var result = _itemApplication.Delete(id); if (result) { message = Request.CreateResponse(HttpStatusCode.OK, "Data has succesfully deleted"); return(message); } return(message); }