Exemplo n.º 1
0
        public async Task <IEnumerable <ProductOption> > GetAllOptionsByProductIdAsync(Guid id)
        {
            var productOptions = await _productOptionRepository.GetAllOptionsByProductIdAsync(id);

            if (productOptions == null || !productOptions.Any())
            {
                throw new ProductOptionNotFoundException($"No product options available for product with Id {id}");
            }
            return(productOptions);
        }