public async Task <ActionResult <Order> > PostOrder(Order order) { var command = new PostOrderCommand() { Order = order }; var result = await _mediator.Send(command); return(CreatedAtAction("GetByOrderId", new { id = result.Id }, result)); }
public async Task <ActionResult <PostOrderCommandResponse> > Post([FromBody] PostOrderCommand request) { return(await Send(request)); }
public async Task <ActionResult <PostOrderCommandResponse> > Post(PostOrderCommand request, CancellationToken cancellationToken = default(CancellationToken)) { return(await Send(request, cancellationToken)); }