Chaos.Mongo
0.9.0
dotnet add package Chaos.Mongo --version 0.9.0
NuGet\Install-Package Chaos.Mongo -Version 0.9.0
<PackageReference Include="Chaos.Mongo" Version="0.9.0" />
<PackageVersion Include="Chaos.Mongo" Version="0.9.0" />
<PackageReference Include="Chaos.Mongo" />
paket add Chaos.Mongo --version 0.9.0
#r "nuget: Chaos.Mongo, 0.9.0"
#:package Chaos.Mongo@0.9.0
#addin nuget:?package=Chaos.Mongo&version=0.9.0
#tool nuget:?package=Chaos.Mongo&version=0.9.0
Chaos.Mongo
Core MongoDB infrastructure for .NET applications, including dependency-injection setup, collection mapping, migrations, database configurators, distributed locks, typed queues, index management, and transaction helpers.
Installation
dotnet add package Chaos.Mongo
Quick start
using Chaos.Mongo;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
var builder = Host.CreateApplicationBuilder(args);
builder.Services.AddMongo("mongodb://localhost:27017", "myDatabase");
var app = builder.Build();
app.Run();
Resolve IMongoHelper to access a mapped collection:
using MongoDB.Driver;
public sealed class UserRepository(IMongoHelper mongo)
{
public async Task AddAsync(User user, CancellationToken cancellationToken = default)
{
var users = mongo.GetCollection<User>();
await users.InsertOneAsync(user, cancellationToken: cancellationToken);
}
}
Related packages
Chaos.Mongo.EventStoreadds aggregate-based event sourcing.Chaos.Mongo.Outboxadds transactional message persistence and background delivery.
Both extension packages reference Chaos.Mongo; they are installed separately and are not part of this core package.
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
- Microsoft.Extensions.Configuration (>= 10.0.11)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.11)
- Microsoft.Extensions.DependencyInjection (>= 10.0.11)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.11)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.11)
- Microsoft.Extensions.Options (>= 10.0.11)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.11)
- MongoDB.Driver (>= 3.11.1)
- System.IO.Hashing (>= 10.0.11)
-
net8.0
- Microsoft.Extensions.Configuration (>= 10.0.11)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.11)
- Microsoft.Extensions.DependencyInjection (>= 10.0.11)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.11)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.11)
- Microsoft.Extensions.Options (>= 10.0.11)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.11)
- MongoDB.Driver (>= 3.11.1)
- System.IO.Hashing (>= 10.0.11)
-
net9.0
- Microsoft.Extensions.Configuration (>= 10.0.11)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.11)
- Microsoft.Extensions.DependencyInjection (>= 10.0.11)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.11)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.11)
- Microsoft.Extensions.Options (>= 10.0.11)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.11)
- MongoDB.Driver (>= 3.11.1)
- System.IO.Hashing (>= 10.0.11)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Chaos.Mongo:
| Package | Downloads |
|---|---|
|
Chaos.Mongo.Outbox
Transactional outbox pattern extension for Chaos.Mongo, providing reliable at-least-once message delivery with MongoDB. |
|
|
Chaos.Mongo.EventStore
Event sourcing extension for Chaos.Mongo, providing aggregate-based event stores with MongoDB. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.9.0 | 208 | 9/6/2026 |
| 0.8.0 | 126 | 9/5/2026 |
| 0.7.1 | 191 | 8/25/2026 |
| 0.7.0 | 317 | 8/5/2026 |
| 0.6.0 | 199 | 7/22/2026 |
| 0.5.0 | 282 | 6/2/2026 |
| 0.4.0 | 438 | 4/11/2026 |
| 0.3.0 | 166 | 4/8/2026 |
| 0.2.0 | 150 | 3/30/2026 |
| 0.2.0-preview.2 | 79 | 2/22/2026 |
| 0.2.0-preview.1 | 84 | 1/29/2026 |
| 0.1.0 | 833 | 11/26/2025 |
| 0.1.0-preview.5 | 501 | 10/18/2025 |
| 0.1.0-preview.4 | 117 | 10/18/2025 |
| 0.1.0-preview.3 | 114 | 10/10/2025 |
| 0.1.0-preview.2 | 187 | 9/30/2025 |
| 0.1.0-preview.1 | 133 | 9/26/2025 |
# v0.9.0 (2026-09-06)
### ✨ Features
- Add independent typed outboxes (#139) by @chA0s-Chris