Exemple #1
0
        public void Snapshot(SimpleAggregate aggregate)
        {
            var memento = aggregate.prepareMemento();

            _storeEvents.Advanced.AddSnapshot(new Snapshot(aggregate.Id.ToString(), memento.Version, memento));
        }
        public void Snapshot(SimpleAggregate aggregate)
        {
            var memento = aggregate.prepareMemento();

            _storeEvents.Advanced.AddSnapshotAsync(new Snapshot(aggregate.Id.ToString(), memento.Version, memento), CancellationToken.None).GetAwaiter().GetResult();
        }