public IActionResult Post([FromBody] OrderToCreateDTO orderToCreate) { OrderToReturnDTO order = _orderService.Post(orderToCreate); return(CreatedAtRoute("GetOrder", new { Id = order.OrderId }, order)); }
public async Task <IActionResult> Get(int id) { OrderToReturnDTO order = await _orderService.Get(id); return(Ok(order)); }