示例#1
0
        public GetProductOptionsResponse Handle(GetProductOptionsRequest request)
        {
            var productOptions = _productOptionRepository.Get(request.ProductId);

            return(new GetProductOptionsResponse {
                ProductOptions = productOptions
            });
        }
        public ProductOption GetOption(Guid productId, Guid id)
        {
            var option = _productOptionRepository.Get(id);

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

            return(option);
        }