public static Flight ToModel(this FlightAddedEvent @event)
 {
     return(new Flight
     {
         Aircraft = @event.Aircraft,
         Number = @event.Number,
         Price = @event.Price,
         ArriveDate = @event.ArriveDate,
         ArriveStation = @event.ArriveStation,
         DepartureDate = @event.DepartureDate,
         DepartureStation = @event.DepartureStation,
         FlightKey = @event.FlightKey
     });
 }
Пример #2
0
 protected virtual void OnFlightAddedEvent(FlightAddedEventArg e)
 {
     FlightAddedEvent?.Invoke(this, e);
 }
Пример #3
0
 public void Apply(FlightAddedEvent aggregateEvent)
 {
     _flights.Add(aggregateEvent.ToModel());
 }