public void Put(int id, ProductDto product)
        {
            _logger.Information($"Update product by id {id}.");

            using var ctx = new Models.awvmsqldbContext();
            var saved = ctx.Products.SingleOrDefault(p => p.ProductId == id);

            saved.Name = product.Name;
            saved.Size = product.Size;

            ctx.SaveChanges();
        }
        public IActionResult Delete(int id)
        {
            _logger.Information($"Delete product by id {id}.");

            using var ctx = new Models.awvmsqldbContext();
            var product = ctx.Products.SingleOrDefault(p => p.ProductId == id);

            if (product == null)
            {
                _logger.Information($"{id} not found.");
                return(NotFound());
            }

            ctx.Products.Remove(product);
            ctx.SaveChanges();

            return(Ok());
        }