Ranvier.Persistence.Marten
0.1.1
dotnet add package Ranvier.Persistence.Marten --version 0.1.1
NuGet\Install-Package Ranvier.Persistence.Marten -Version 0.1.1
<PackageReference Include="Ranvier.Persistence.Marten" Version="0.1.1" />
<PackageVersion Include="Ranvier.Persistence.Marten" Version="0.1.1" />
<PackageReference Include="Ranvier.Persistence.Marten" />
paket add Ranvier.Persistence.Marten --version 0.1.1
#r "nuget: Ranvier.Persistence.Marten, 0.1.1"
#:package Ranvier.Persistence.Marten@0.1.1
#addin nuget:?package=Ranvier.Persistence.Marten&version=0.1.1
#tool nuget:?package=Ranvier.Persistence.Marten&version=0.1.1
Ranvier.Persistence.Marten
Marten/PostgreSQL storage for Ranvier.Persistence, targeting .NET 10. The adapter is a separate package; Marten does
not become a dependency of the core or persistence packages.
open Marten
open Ranvier.Persistence
open Ranvier.Persistence.Marten
use database = DocumentStore.For connectionString
let store = MartenStateStore(database, "customer-42") :> IStateStore
The caller owns database. Each operation uses a fresh session. The nonblank scope is a Marten tenant:
loads, deletes and Clear affect that scope only. Use a scope per application state partition, not per call.
Marten's normal schema management applies to the adapter's MartenStateDocument mapping.
SaveManycommits a whole batch in one PostgreSQL transaction.ETag = Noneunconditionally inserts or replaces a record.- A loaded record has an opaque ETag. Pass it back to require that version: stale or deleted records fault the
batch with
JasperFx.ConcurrencyException, possibly wrapped inAggregateException. Reload after a successful conditional save to get its new ETag. - Duplicate keys in a save and malformed ETags raise
ArgumentExceptionbefore committing. - Keys are case-sensitive; empty keys round-trip at the store level. Keys must be valid Unicode.
PersistSessioncurrently writesNone, so ordinary persisted signals retain last-writer-wins behaviour. Explicit conditional saves are available throughIStateStore.
For a graph round trip and conditional updates, see the Marten guide.
Integration tests
Use a disposable PostgreSQL database. Set RANVIER_MARTEN_CONNECTION, then run:
dotnet test tests/Ranvier.Persistence.Marten.Tests -c Release
The suite reuses the shared persistence conformance cases and optimistic-store cases. It also checks competing writers, atomic rollback, tenant isolation, unusual keys and a graph restart. Missing configuration or an unavailable database fails the suite.
The build CLI's ordinary test pipeline excludes this integration project; CI runs it separately with PostgreSQL.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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
- FSharp.Core (>= 10.1.404)
- Marten (>= 9.54.1)
- Ranvier.Persistence (>= 0.1.1)
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.1.1 | 51 | 11/14/2026 |
| 0.1.1-preview.1 | 67 | 10/28/2026 |
| 0.1.0-preview.1 | 61 | 10/26/2026 |
Pre-1.0 release. The API may change before 1.0.