コード例 #1
0
 private async Task <Order> GetOrder(int orderId, string token)
 {
     try
     {
         return(await customerOrderService.GetOrder(orderId, token));
     }
     catch (Exception ex)
     {
         logger.LogError(ex.Message);
         throw;
     }
 }
コード例 #2
0
        public async Task <IActionResult> Get(OrderRequest orderRequest)
        {
            var customer = await _customerDetailsApiClient.GetCustomer(orderRequest.User);

            if (customer == null || string.IsNullOrWhiteSpace(customer.CustomerId))
            {
                return(BadRequest("Invalid Request!"));
            }

            var customerOrder = _customerOrderService.GetOrder(customer);

            return(Ok(customerOrder));
        }