Chaos.Mongo.EventStore 0.9.0

dotnet add package Chaos.Mongo.EventStore --version 0.9.0
                    
NuGet\Install-Package Chaos.Mongo.EventStore -Version 0.9.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Chaos.Mongo.EventStore" Version="0.9.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Chaos.Mongo.EventStore" Version="0.9.0" />
                    
Directory.Packages.props
<PackageReference Include="Chaos.Mongo.EventStore" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Chaos.Mongo.EventStore --version 0.9.0
                    
#r "nuget: Chaos.Mongo.EventStore, 0.9.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Chaos.Mongo.EventStore@0.9.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Chaos.Mongo.EventStore&version=0.9.0
                    
Install as a Cake Addin
#tool nuget:?package=Chaos.Mongo.EventStore&version=0.9.0
                    
Install as a Cake Tool

Chaos.Mongo.EventStore

GitHub License NuGet Version NuGet Downloads GitHub last commit GitHub Actions Workflow Status

Event sourcing for MongoDB with aggregate reconstruction, append-only event streams, optimistic concurrency, idempotency, checkpoints, and transactional callbacks.

Installation

dotnet add package Chaos.Mongo.EventStore

Quick start

Define an aggregate and event:

using Chaos.Mongo.EventStore;

public sealed class OrderAggregate : Aggregate
{
    public string CustomerName { get; set; } = string.Empty;
}

public sealed class OrderCreated : Event<OrderAggregate>
{
    public string CustomerName { get; set; } = string.Empty;

    public override void Execute(OrderAggregate aggregate)
        => aggregate.CustomerName = CustomerName;
}

Register the core MongoDB services and the event store:

services.AddMongo("mongodb://localhost:27017", "myDatabase")
    .WithEventStore<OrderAggregate>(eventStore => eventStore
        .WithEvent<OrderCreated>("OrderCreated")
        .WithCollectionPrefix("Orders"));

Append an event through IEventStore<TAggregate>:

var orderId = Guid.NewGuid();
var version = await eventStore.GetExpectedNextVersionAsync(orderId);

var order = await eventStore.AppendEventsAsync(
[
    new OrderCreated
    {
        AggregateId = orderId,
        Version = version,
        CustomerName = "Ada"
    }
]);

Package relationships

This package references Chaos.Mongo, which supplies the connection, dependency-injection, transaction, and configuration infrastructure. Chaos.Mongo.Outbox is optional and can be combined with event-store transactional callbacks when event changes must publish external messages reliably.

Documentation

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.9.0 99 9/6/2026
0.8.0 95 9/5/2026
0.7.1 109 8/25/2026
0.7.0 115 8/5/2026
0.6.0 112 7/22/2026
0.5.0 142 6/2/2026
0.4.0 131 4/11/2026
0.3.0 122 4/8/2026
0.2.0 120 3/30/2026
0.2.0-preview.2 83 2/22/2026

# v0.9.0 (2026-09-06)

### ✨ Features

- Add independent typed outboxes (#139) by @chA0s-Chris