Beispiel #1
0
        public async Task <IActionResult> AddProduct([FromBody] ProductDto newProduct)
        {
            _logger.LogThisMethod();
            var idProductAdded = await _catalogService.AddProductAsync(newProduct);

            var uri = Url.Link(nameof(GetProduct), new { id = idProductAdded });

            return(Created(uri, newProduct));
        }