示例#1
0
        public async Task <IActionResult> GetOrder(string orderId, string correlationToken)
        {
            Guard.ForNullOrEmpty(orderId, "OrderId");
            Guard.ForNullOrEmpty(correlationToken, "correlationToken");

            var orderresult = await _orderQueries.GetOrderCosmos(orderId, correlationToken);

            if (orderresult == null)
            {
                return(new ObjectResult(orderresult));
            }

            // Map Order to OrderDto
            var OrderDto = Mapper.MapToOrderDto(orderresult);

            return(new ObjectResult(OrderDto));
        }