Example #1
0
        public void Confirm()
        {
            if (Status != ReservationStatus.Tentative)
            {
                throw new InvalidOperationException($"Only tentative reservation can be confirmed (current status: {Status}.");
            }

            var @event = ReservationConfirmed.Create(Id);

            Enqueue(@event);
            Apply(@event);
        }