Esempio n. 1
0
        public FlightReservationCreated Create(CreateFlightReservation cmd)
        {
            var evt = new FlightReservationCreated
            {
                Localizer   = Guid.NewGuid().ToString().Substring(5),
                FlightId    = cmd.FlightId,
                PassengerId = cmd.PassengerId
            };

            Apply(evt);
            return(evt);
        }
Esempio n. 2
0
 void Apply(FlightReservationCreated created)
 {
     Localizer = created.Localizer;
 }
Esempio n. 3
0
 public void On(FlightReservationCreated created)
 {
     _reservations.Add(new ReservationListItem {
         Localizer = created.Localizer, FlightId = created.Localizer
     });
 }