public async Task <int> DeleteCategoryAsync(int id) { if (id != null) { throw new ArgumentNullException("id"); } return(await categoryRepository.DeleteItemAsync(id)); }