Example #1
0
        public async Task <IHttpActionResult> CreateRequestAsync([FromBody] UpdateRequest createRequest)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var product = await _productStoreRequestService.CreateRequestAsync(createRequest);

            var location = string.Format("/api/productRequests/{0}", product.Id);

            return(Created <FeedbackRequest>(location, product));
        }
Example #2
0
        public async Task <IHttpActionResult> AddProductCategory([FromBody] UpdateRequestRequest createRequest)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var request = await _productStoreRequestService.CreateRequestAsync(createRequest);

            var location = string.Format("/api/requests/{0}", request.Id);

            return(Created <ProductStoreItemRequest>(location, request));
        }