public async Task <IActionResult> DeleteCatalog(int id) { var item = await _catalogRepository.GetItemById(id); if (item == null) { return(NotFound()); } _catalogRepository.DeleteItem(item); await _catalogRepository.SaveChangesAsync(); return(NoContent()); }