Provance.Storage.MongoDB 0.0.3

dotnet add package Provance.Storage.MongoDB --version 0.0.3
                    
NuGet\Install-Package Provance.Storage.MongoDB -Version 0.0.3
                    
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="Provance.Storage.MongoDB" Version="0.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Provance.Storage.MongoDB" Version="0.0.3" />
                    
Directory.Packages.props
<PackageReference Include="Provance.Storage.MongoDB" />
                    
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 Provance.Storage.MongoDB --version 0.0.3
                    
#r "nuget: Provance.Storage.MongoDB, 0.0.3"
                    
#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 Provance.Storage.MongoDB@0.0.3
                    
#: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=Provance.Storage.MongoDB&version=0.0.3
                    
Install as a Cake Addin
#tool nuget:?package=Provance.Storage.MongoDB&version=0.0.3
                    
Install as a Cake Tool

<p align="center"> <img src="provanceMongoDb.png" alt="PROVANCE MongoDB logo" width="120" /> </p>

Provance.Storage.MongoDB

MongoDB storage provider for PROVANCE (ILedgerStore), including a simple single-writer lease mechanism.

  • NuGet: Provance.Storage.MongoDB

Install

dotnet add package Provance.Storage.MongoDB

Configure

{
  "MongoDb": {
    "ConnectionString": "mongodb://localhost:27017",
    "DatabaseName": "provance",
    "CollectionName": "ledger_entries_v1"
  }
}

Register

using Provance.Storage.MongoDB.Extensions;

builder.Services.AddProvanceMongoStorage(builder.Configuration);

What it creates

  • Ledger entries collection (your configured CollectionName)
  • Lock/lease collection: provance_locks

Recommended indexes (v0.0.3+ new ledger collection):

  • chain head lookup by Sequence (descending)
  • lookup by Id
  • unique Sequence (prevents duplicates and enforces deterministic ordering)

The MongoDB store creates these indexes automatically on startup. If your Mongo user cannot create indexes, initialization will fail. In that case, create the indexes manually.

License

MIT

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 was computed.  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.0.3 151 11/28/2025
0.0.2 199 11/25/2025

v0.0.3: Deterministic ordering via Sequence + single-writer lease support.