protected override void OnRecover(object message) { switch (message) { case ReservationCreated m: { ReserveSeat(m); } break; case ReservationDiscarded m: { DiscarReservation(m); } break; case SnapshotOffer m: { var state = m.Snapshot as EventReservationsState; _state = state; } break; } }
public EventReservationsActor(string eventId) { PersistenceId = $"Reservations-{eventId}"; _state = new EventReservationsState(); _state.EventId = eventId; }