Exemple #1
0
        public async Task <IActionResult> CreateAsync([FromForm] ProductCreateRequest request)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var domainRequest = mapper.Map <Domains.ProductCreateRequest>(request);
            await manageProductService.CreateAsync(domainRequest);

            return(StatusCode(StatusCodes.Status201Created));
        }