O'Reilly logo

Implementing Domain-Driven Design by Vaughn Vernon

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Implementing an Event Store

Let’s now actually implement a few different Event Stores that are suitable for use with A+ES. The Stores here are simple and aren’t designed for extremely high performance, yet they will be good enough for most domains.

While the implementation for each of the various Event Stores is different, the contracts are the same:

public interface IEventStore {   // loads all events for a stream   EventStream LoadEventStream(IIdentity id);   // loads subset of events for a stream   EventStream LoadEventStream(     IIdentity id, int skipEvents, int maxCount);   // appends events to a stream, throwing   // OptimisticConcurrencyException another appended   // new events since expectedversion   void ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required