Ejemplo n.º 1
0
        public async Task AcceptOrder(string orderId)
        {
            await _publisher.PublishDeliveryRequest(new DeliveryRequest()
            {
                OrderId         = orderId,
                DeliveryAddress = "",
                PickupTime      = DateTime.Now.AddMinutes(new Random().Next(10, 20))
            });

            await _publisher.PublishRestaurantOrderStatus(new RestaurantOrderStatus()
            {
                OrderId = orderId,
                Status  = RestaurantOrderStatusDTO.Accepted
            });
        }