public Task Handle(TCommand command)
        {
            MultiSiteId id = CreateAggregateRootIdFromCommand(command);

            eventSessionFactory
            .Create().StoreEventAndCommit(
                CreateEventFromCommand(command, id),
                id.ToEventStreamId(),
                localMachine);

            return(Task.FromResult(false));
        }
Beispiel #2
0
 IEnumerable <SourcedEvent> GetEvents(MultiSiteId aggregateRootId)
 {
     return(eventSessionFactory.Create().GetEvents(aggregateRootId.ToEventStreamId()).ToList());
 }
Beispiel #3
0
 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());
 }