Пример #1
0
        public GetProductOptionsResponse Handle(GetProductOptionsRequest request)
        {
            var productOptions = _productOptionRepository.Get(request.ProductId);

            return(new GetProductOptionsResponse {
                ProductOptions = productOptions
            });
        }
Пример #2
0
        public ProductOption GetOption(Guid productId, Guid id)
        {
            var option = _productOptionRepository.Get(id);

            if (option == null)
            {
                throw new HttpResponseException(HttpStatusCode.NotFound);
            }

            return(option);
        }