SoftwareDriven.Persistence 3.0.5

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

SoftwareDriven.Persistence

A .NET persistence abstraction library providing a unified interface for different data storage backends. Targets net8.0 and net10.0.

Installation

dotnet add package SoftwareDriven.Persistence

Core Interfaces

Interface Purpose
IPersistenceModel Base model interface requiring string? Id
IBasicPersistenceProvider<T> CRUD operations, expression-based querying, pagination
IPersistenceProvider<T> Extended: nested collection projections, element match, file storage
IDatabaseManager Provider factory and table name registry

Built-in: FileSystem Provider

The core package includes a JSON file-based provider for simple scenarios.

services.AddSingleton(new JsonSerializerOptions());
services.AddSingleton<FileSystemManager>();
services.AddSingleton<FileSystemDataProvider<MyModel>>();

Provider Packages

Package Backend
SoftwareDriven.Persistence.MongoDb MongoDB
SoftwareDriven.Persistence.Cassandra Apache Cassandra
SoftwareDriven.Persistence.EF.SQLite Entity Framework Core / SQLite
SoftwareDriven.Persistence.IndexedDb Browser IndexedDB (Blazor)

Usage

All providers implement the same interfaces, allowing backend-agnostic code:

public class MyService
{
    private readonly IBasicPersistenceProvider<MyModel> provider;

    public MyService(IBasicPersistenceProvider<MyModel> provider)
    {
        this.provider = provider;
    }

    public async Task Example()
    {
        // Create
        await provider.CreateOrUpdate(new MyModel { Title = "Hello" });

        // Query with expressions
        var results = await provider.FindByExpression(x => x.Title == "Hello");

        // Paginate
        var page = await provider.GetAll(new PaginationOptions<MyModel>
        {
            PageSize = 10,
            PageNumber = 0
        });
    }
}

Models

Inherit from PersistenceModelBase or implement IPersistenceModel:

public class MyModel : PersistenceModelBase
{
    public string Title { get; set; } = "";
    public bool IsActive { get; set; }
}

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 (4)

Showing the top 4 NuGet packages that depend on SoftwareDriven.Persistence:

Package Downloads
SoftwareDriven.Persistence.MongoDb

SoftwareDriven.Persistence.MongoDb is a library with a persistence layer for MongoDb building on top of SoftwareDriven.Persistence.

SoftwareDriven.Persistence.Cassandra

SoftwareDriven.Persistence.Cassandra is a library with a persistence layer for Apache Cassandra building on top of SoftwareDriven.Persistence. Includes DataStax C# Driver for Apache Cassandra v3.19.1 with modifications.

SoftwareDriven.Persistence.EF.SQLite

SoftwareDriven.Persistence.EF.SQLite is a library with a persistence layer for EntityFramework SQLite building on top of SoftwareDriven.Persistence.

SoftwareDriven.Persistence.IndexedDb

SoftwareDriven.Persistence.IndexedDb is a library with a persistence layer for browser IndexedDB building on top of SoftwareDriven.Persistence.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.5 176 4/2/2026
3.0.4 180 2/12/2026
3.0.3 262 2/11/2026
3.0.2 106 2/11/2026
3.0.1 113 2/11/2026
3.0.0 187 2/1/2026
2.12.0 194 1/8/2026
2.9.1 479 4/24/2025
2.9.0 923 11/30/2024
2.8.2 266 11/18/2024
2.8.1 629 7/19/2024
2.8.0 409 7/7/2024
2.7.3 218 11/18/2024
2.7.2 242 6/30/2024
2.7.0 1,128 11/27/2023
2.6.1 1,041 7/25/2023
2.6.0 816 7/23/2023
2.5.3 827 4/21/2023
Loading failed