Esempio n. 1
0
        private async Task ValidateCategory(int id)
        {
            var Category = await CategoriesRepository.GetCategoryAsync(id);

            if (Category == null)
            {
                throw new NotFoundItemException("invalid Category to delete");
            }
            CategoriesRepository.DetachEntity(Category);
        }