Exemple #1
0
 /// <summary>
 /// Handles the message provided.
 /// </summary>
 /// <param name="message">The message to be handled.</param>
 public async void Handle(BookingCancelledEvent message)
 {
     if (message.TherapistId != TherapistId.Empty)
     {
         await _repository
         .UpdateTherapistBookingAsync(
             message.TenantId,
             message.BookingId,
             message.TherapistId,
             BookingStatus.CancelledByTherapist,
             null,
             CancellationToken.None)
         .ConfigureAwait(false);
     }
     else
     {
         await _repository
         .UpdateBookingAsync(
             message.TenantId,
             message.BookingId,
             BookingStatus.CancelledByClient,
             null,
             null,
             CancellationToken.None)
         .ConfigureAwait(false);
     }
 }
Exemple #2
0
        private void Handle(BookingCancelledEvent e)
        {
            var booking = context.Set <BookingEntity>().Find(e.Booking.Id);

            booking.Status       = (int)e.Booking.Status;
            booking.ModifiedBy   = "Anonymous";
            booking.ModifiedDate = DateTime.Now;
            context.Set <BookingEntity>().Update(booking);
        }