Beispiel #1
0
        public FlightReservationCreated Create(CreateFlightReservation cmd)
        {
            var evt = new FlightReservationCreated
            {
                Localizer   = cmd.Localizer,
                FlightId    = cmd.FlightId,
                PassengerId = cmd.PassengerId
            };

            Apply(evt);
            return(evt);
        }
Beispiel #2
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);
        }
Beispiel #3
0
 public void On(FlightReservationCreated created)
 {
     Repository.List.Add(new ReservationView {
         Localizer = created.Localizer, FlightId = created.FlightId
     });
 }
Beispiel #4
0
 void Apply(FlightReservationCreated created)
 {
     Localizer = created.Localizer;
 }
Beispiel #5
0
 public void On(FlightReservationCreated created)
 {
     _reservations.Add(new ReservationListItem {
         Localizer = created.Localizer, FlightId = created.Localizer
     });
 }