public Task Handle(TCommand command) { MultiSiteId id = CreateAggregateRootIdFromCommand(command); eventSessionFactory .Create().StoreEventAndCommit( CreateEventFromCommand(command, id), id.ToEventStreamId(), localMachine); return(Task.FromResult(false)); }
IEnumerable <SourcedEvent> GetEvents(MultiSiteId aggregateRootId) { return(eventSessionFactory.Create().GetEvents(aggregateRootId.ToEventStreamId()).ToList()); }
public async Task ProjectAsync <TProjection>(MultiSiteId id, Action <TProjection> onLoaded) where TProjection : new() { await CreateProjectionFromEvents(retreiver.GetEvents(id.ToEventStreamId()), onLoaded); }
internal EventStreamId GetEventStreamId() { return(multiSiteId.ToEventStreamId()); }