private Booking() { context = new EventSourceContext() .Given <BookingOpened>(e => Id = e.Id) .Given <FlightRequested>((ctx, e) => { Flight = new Flight(ctx.Then); Flight.Given(e); }) .Given <FlightConfirmed>(e => Flight.Given(e)); }
public EventStore(EventSourceContext eventSourceContext) { _eventSourceContext = eventSourceContext; }