public HttpResponseMessage Delete(int id) { if (id > 0) { var responseok = _shoppingListService.DeleteItem(id); return(Request.CreateResponse(HttpStatusCode.OK, responseok)); } return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, "Item not found")); }
public ActionResult DeleteItem([FromRoute] Guid listId, [FromRoute] Guid Id) { var res = _service.DeleteItem(listId, Id); if (res) { return(Ok()); } else { return(NotFound()); } }