public async Task <ActionResult> Delete(int id) { Category category = await _categoryBusiness.GetCategoryPatchById(id); if (category == null) { return(NotFound()); } bool result = await _categoryBusiness.DeleteCategory(category); if (result) { return(NoContent()); } else { return(BadRequest()); } }
public void Delete(int key) { _categoryBusiness.DeleteCategory(key); }
public async Task <string> DeleteCategory(int id) { return(await categoryBusiness.DeleteCategory(id)); }