// DELETE api/<controller>/5 public IHttpActionResult Delete(int id) { IHttpActionResult result = null; CompanyCategoryService service = new CompanyCategoryService(); CompanyCategory companyCategory = service.GetCompanyCategory(id); if (companyCategory != null) { service.RemoveCompanyCategory(id); result = Ok(true); } else { result = NotFound(); } return(result); }