コード例 #1
0
 public HttpResponseMessage GetAll(HttpRequestMessage request, int productId, int?sizeId, int?colorId)
 {
     return(CreateHttpResponse(request, () =>
     {
         var model = _productQuantityService.GetAll(productId, sizeId, colorId);
         var responseData = Mapper.Map <IEnumerable <ProductQuantity>, IEnumerable <ProductQuantityViewModel> >(model);
         var response = request.CreateResponse(HttpStatusCode.OK, responseData);
         return response;
     }));
 }
コード例 #2
0
 public IActionResult Get(int productId)
 {
     return(new OkObjectResult(_productQuantityService.GetAll(productId)));
 }