Ejemplo n.º 1
0
        public async Task <IActionResult> UpdateAsync([FromForm] ProductUpdateRequest request)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var domainRequest = mapper.Map <Domains.ProductUpdateRequest>(request);
            var result        = await manageProductService.UpdateAsync(domainRequest);

            if (result)
            {
                return(Ok());
            }

            return(NotFound());
        }