Ejemplo n.º 1
0
        public async Task <CreatedAtActionResult> Create(CreateOrder createOrder)
        {
            var orderCreated = await _createOrderHandler.Handle(createOrder);

            // Returning value works only if read model is created synchronously.
            var orderDetails = await _orderDetailsFinder.GetBy(orderCreated.OrderId);

            return(CreatedAtAction("Get", new { id = orderCreated.OrderId }, orderDetails));
        }
 public async Task <AllOrderDetails> Get(Guid id) => await _orderDetailsFinder.GetBy(id);