public async Task <ActionResult <Product> > CreateProduct([FromBody] Product productToInsert) { await _productRespository.CreateProduct(productToInsert); return(CreatedAtRoute("GetProduct", new { id = productToInsert.Id }, productToInsert)); }
public async Task <ActionResult <Product> > CreateProduct([FromBody] Product productToInsert) { await _productRespository.CreateProduct(productToInsert); return(CreatedAtRoute("GetProduct", new { id = productToInsert.Id }, productToInsert)); }