public IActionResult PostProduct([FromBody] Product product) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } productsBL.Save(product); return(CreatedAtAction("GetProduct", new { id = product.id_product }, product)); }
public IActionResult PostProduct([FromBody] Product product) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } productsBL.Save(product); return(CreatedAtAction("GetProduct", new { id = product.id_product }, product)); }