コード例 #1
0
        public async Task <ActionResult <ProductRespone> > UpdateProduct(int id, [FromForm] ProductRequest productReq)
        {
            var productRes = await _productRepository.UpdateProduct(id, productReq);

            return(Ok(productRes));
        }
コード例 #2
0
        public async Task <ActionResult <ProductRespone> > CreateProduct([FromForm] ProductRequest productReq)
        {
            var product = await _productRepository.CreateProduct(productReq);

            return(Created(Endpoints.Product, product));
        }