public void Handle(string id, IEnumerable <TEventBase> events) { var materializedEvents = events?.ToList() ?? new List <TEventBase>(); if (!AnyEventsToHandle(materializedEvents)) { return; } var view = ViewRepository.Read <TView>(id) ?? new TView(); view = Handle(materializedEvents, view); ViewRepository.Commit(id, view); }
public void Rebuild(string id) { var view = ReadFromStream(id); ViewRepository.Commit(id, view); }