// DELETE api/<controller>/5 public IHttpActionResult Delete(int id) { bool res = dal.EndTask(id); if (res) { return(Ok()); } else { return(NotFound()); } }