Beispiel #1
0
        public ActionResult Post([FromBody] ProductModel request)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            var response = _productManager.AddToStock(request);

            return(CreatedAtAction(nameof(Get), new { productId = response.ProductId }, response));
        }