Exemplo n.º 1
0
        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());
            }
        }
Exemplo n.º 2
0
 public void Delete(int key)
 {
     _categoryBusiness.DeleteCategory(key);
 }
Exemplo n.º 3
0
 public async Task <string> DeleteCategory(int id)
 {
     return(await categoryBusiness.DeleteCategory(id));
 }