Ejemplo n.º 1
0
        private async Task MakeOrder(CurrentOrderState currentOrderState)
        {
            store.Dispatch(new StartOrderAction());
            try
            {
                var(order, orderDetails) = await restService.OrderAsync(currentOrderState.Order, currentOrderState.OrderDetails);

                store.Dispatch(new OrderSuccessAction(order, orderDetails));
                store.Dispatch(new CreateOrderAction());
            }
            catch (Exception ex)
            {
                store.Dispatch(new OrderFailAction());
            }
        }