public CategoryProductsDTO GetCategoryProducts(string CategoryName)
        {
            bool exists = productDatabaseContext.CategoryExists(CategoryName);

            if (!exists)
            {
                throw new CategoryDoesNotExistsException();
            }
            CategoryProductsDTO newCategoryProductsDTO = productDatabaseContext.GetCategoryProducts(CategoryName);

            return(newCategoryProductsDTO);
        }
Exemple #2
0
        public CategoryProductDTO GetCategoryProducts(string CategoryName)
        {
            try
            {
                bool CategoryExist = productDatabaseContext.CategoryExists(CategoryName);
            }
            catch (NotFoundException ex)
            {
                throw new CatgoryDoesNotExistsException();
            }
            CategoryProductDTO categoryProductDTO = productDatabaseContext.GetCategoryProducts(CategoryName);

            return(categoryProductDTO);
        }