/NStore

Opinionated eventsourcing library

Primary LanguageC#MIT LicenseMIT

logo

NStore

(Yet Another) Opinionated Event Sourcing Library

This project is a playground for experimenting with .net Standard, async and a simple API for a Sql/NoSql backed EventStore. Heavily inspired from NEventStore, rewritten from scratch to be simple to learn and highly extensible.

CI Status

Build server Platform Build Status
AppVeyor Windows Build status
Travis Ubuntu Build status
GH Actions Linux Build status
Azdo Windows Build status

Quickstart

Streams API

var persister = new InMemoryPersistence();
var streams = new StreamsFactory(persister);

// Write to stream
var stream = streams.Open("Stream_1");
await stream.AppendAsync(new { data = "Hello world!" });

// Read from stream
await stream.ReadAsync(data => {
    Console.WriteLine($"  index {data.Index} => {data.Payload}");
    return Task.FromResult(true);
});

Learn

The source comes with a Sample App to illustrate some basic stuff you can do.

Status

In production (MongoDB & SqlServer) since 2017 on two major products.