private async Task ProcessOrder(IMessageHandlerContext context)
        {
            if (Data.IsPaid && Data.IsReserved)
            {
                var @event = new BookingCompleted();
                @event.ApartmentsId = Data.ApartmentsId;

                _logger.Info($"BookingCompleted event publishing, apartments id: {Data.ApartmentsId}");
                await context.Publish(@event);

                MarkAsComplete();
            }
        }
Exemplo n.º 2
0
        public void Process(CompleteBooking command)
        {
            var e = new BookingCompleted(command.User);

            ApplyEvent(e);
        }
Exemplo n.º 3
0
 public void Apply(BookingCompleted dEvent)
 {
     this.BookingStatus = dEvent.newBookingStatus;
 }