Esempio n. 1
0
        /// <summary>
        /// Copies an aggregate to offline storage and removes it from online logs.
        /// </summary>
        public void Box <T>(T aggregate) where T : AggregateRoot
        {
            TakeSnapshot(aggregate, true);

            _snapshotStore.Box(aggregate.AggregateIdentifier);
            _eventStore.Box(aggregate.AggregateIdentifier);

            _cache.Remove(aggregate.AggregateIdentifier);
        }