QuickPersistr 0.0.2

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

QuickPersistr

Property-based persistence testing for .NET.

QuickPersistr generates entities and sequences of create, read, update, and delete operations, then checks the persisted result through fresh sessions. Failed runs are shrunk to a small reproducible case and include a seed for replay.

This package contains the engine and persistence contracts. EF Core users normally install one of the provider packages instead. This brings this package in transitively.

Choose a package

Package Use it for
QuickPersistr.EntityFrameworkCore.Sqlite Isolated in-memory SQLite tests
QuickPersistr.EntityFrameworkCore.PostgreSql Isolated databases on a real PostgreSQL server
QuickPersistr.EntityFrameworkCore EF Core with externally managed database setup
QuickPersistr Implementing an adapter for another persistence technology

To implement an adapter, provide IPersistenceScope<TReader> and IPersistenceReader<TReader>. A scope must be able to commit changes and discard its current session without discarding committed data. Composite identities use the array overloads, and optimistic-concurrency specifications require OpenConcurrentSession().

public interface IPersistenceReader<TReader>
{
    TResult Query<TResult>(Func<TReader, TResult> query);
}

The complete contracts are in IPersistenceScope.cs and IPersistenceReader.cs.

Aggregate roots and dependents

Specifications registered with .Entities(...) are independently persisted roots. A child specification supplied through .From(...) in a HasOne or HasMany contract is instead exercised through its parent, so required foreign keys are valid. QuickPersistr runs its full configured contract: generated and unique identities, property reads and updates, domain updates, optimistic concurrency, nested relationships, rejected operations, deletion, and post-delete expectations. Generated child updates leave relationship-owned foreign keys untouched, and rejected creates attach through the parent before commit. Register the child separately only when it can also be validly persisted without its parent.

Replaying a failure

Every failed run reports its seed. Pass that seed to Run to reproduce the same generated scenario:

persister.Run(seed);

See the project README for the full DSL, examples, and provider guidance.

QuickPersistr is an early preview targeting .NET 8. Until version 1.0, its public API may change between releases.

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 was computed.  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 (1)

Showing the top 1 NuGet packages that depend on QuickPersistr:

Package Downloads
QuickPersistr.EntityFrameworkCore

Provider-neutral Entity Framework Core persistence scope for QuickPersistr.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.2 142 8/8/2026
0.0.1 144 8/7/2026