Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Repository

Samuel Debruyn edited this page Dec 24, 2015 · 2 revisions

The aggregate root repository is the abstraction that hydrates aggregate root instances when they're needed.

In most cases you do not need to access the repository directly because aggregate root instances are hydrated as needed when you Create, Load, and TryLoad them.

This would be the service to decorate though if you wanted to implement some form of aggregate root snapshot caching.

To enable snapshot caching, all you have to do is define the maximum amount of cached aggregate roots.

var processor = CommandProcessor.With().....AggregateRootRepository(conf =>
{
    conf.EnableInMemorySnapshotCaching(123);
}).Create();
Clone this wiki locally