public IActionResult Post([FromBody] PlaceOrderInput input) { var order = _placeOrderService.Execute(input); Console.WriteLine("Ordem criada: " + order);//apenas para efeito de demo return(Ok(new { Message = "Ordem criada: " + order }));; }
public IActionResult Get([FromForm] int productId, [FromForm] int quantity) { _placeOrderUseCase.Execute(new PlaceOrderInput(productId, quantity, DateTime.Now)); return(Ok()); }
public IActionResult Post([FromBody] PlaceOrderInput input) { return(Ok(new { Message = _placeOrderService.Execute(input) })); }