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
<PackageReference Include="Chaos.Mongo.EventStore" Version="0.9.0" />
<PackageVersion Include="Chaos.Mongo.EventStore" Version="0.9.0" />
<PackageReference Include="Chaos.Mongo.EventStore" />
paket add Chaos.Mongo.EventStore --version 0.9.0
#r "nuget: Chaos.Mongo.EventStore, 0.9.0"
#:package Chaos.Mongo.EventStore@0.9.0
#addin nuget:?package=Chaos.Mongo.EventStore&version=0.9.0
#tool nuget:?package=Chaos.Mongo.EventStore&version=0.9.0
Chaos.Mongo.EventStore
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 | Versions 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. |
-
net10.0
- Chaos.Mongo (>= 0.9.0)
-
net8.0
- Chaos.Mongo (>= 0.9.0)
-
net9.0
- Chaos.Mongo (>= 0.9.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
# v0.9.0 (2026-09-06)
### ✨ Features
- Add independent typed outboxes (#139) by @chA0s-Chris