Soenneker.Zelos.Suite 3.0.66

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Zelos.Suite --version 3.0.66
                    
NuGet\Install-Package Soenneker.Zelos.Suite -Version 3.0.66
                    
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="Soenneker.Zelos.Suite" Version="3.0.66" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Zelos.Suite" Version="3.0.66" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Zelos.Suite" />
                    
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 Soenneker.Zelos.Suite --version 3.0.66
                    
#r "nuget: Soenneker.Zelos.Suite, 3.0.66"
                    
#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 Soenneker.Zelos.Suite@3.0.66
                    
#: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=Soenneker.Zelos.Suite&version=3.0.66
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Zelos.Suite&version=3.0.66
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image Soenneker.Zelos.Suite

The file-based JSON document database engine


What is Zelos?

Zelos is a lightweight, embedded data store for .NET applications. It leverages JSON for persistent storage while maintaining an in-memory cache for rapid data access. With asynchronous, thread-safe operations, Zelos minimizes I/O overhead by periodically saving only modified containers.


Key Benefits & Features

  • Embedded & Minimalistic: Operates without the overhead of an external database server.
  • Responsive Asynchronous I/O: Uses async operations to keep your application fast and non-blocking.
  • Robust Concurrency: Employs asynchronous locks and semaphores to manage thread safety.
  • Container Organization: Segregate your data logically using named containers.
  • Efficient Persistence: Automatically saves only when necessary to reduce disk IO.
  • Resource Management: Designed to automatically dispose resources when no longer needed, ensuring clean shutdowns.
  • Repository Pattern Integration: Streamlines CRUD operations with a familiar design pattern.

Architecture & Components

ZelosDatabase

  • Core engine managing the persistence layer.
  • Loads or creates the database file on startup.
  • Periodically saves dirty containers.
  • Manages container initialization and data consistency.

ZelosContainer & IZelosContainerUtil

  • ZelosContainer:

    • Represents an in-memory container for key/value pairs (stored as JSON).
    • Handles adding, updating, and deleting items, marking itself as “dirty” for periodic saves.
  • IZelosContainerUtil:

    • Usage: Retrieves containers by combining the database file path and container name.
    • Caching & Creation: Manages container lifecycle, ensuring each container is only loaded once.

ZelosRepository

  • Provides a higher-level abstraction using the repository pattern.
  • Exposes common CRUD operations for generic document types.
  • Uses IZelosContainerUtil internally to obtain the right container.
  • Integrates logging and configuration for detailed diagnostics.

Installation

dotnet add package Soenneker.Zelos.Suite

and then register it:

services.AddZelosSuiteAsSingleton();

Zelos User Management Example

This guide demonstrates how to build a simple user management system using Zelos. The example includes:

  • UserDocument: A data model representing a user.
  • UsersRepository: Inherits from ZelosRepository<UserDocument>.
  • UserManager: Injects the repository to perform CRUD operations.

Step 1: Define the User Document

Create a UserDocument class that represents the user data model. This class should inherit from your base Document class.

using Soenneker.Documents.Document;

public class UserDocument : Document
{
    public string Name { get; set; } = string.Empty;
    public string Email { get; set; } = string.Empty;
}

Step 2: Create the Users Repository

Create an interface (IUsersRepository) for user-specific operations. Then, implement this interface in a class UsersRepository that inherits from ZelosRepository<UserDocument>. The repository will set the database file path and container name (in this case, "users").

using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
using Soenneker.Zelos.Repository;
using Soenneker.Zelos.Container.Util.Abstract;

public class UsersRepository : IZelosRepository<UserDocument>
{
    public UsersRepository(IConfiguration configuration, ILogger<UsersRepository> logger, 
        IZelosContainerUtil containerUtil) : base(configuration, logger, containerUtil)
    {
        // Set the database file path and container name
        DatabaseFilePath = "data/zelos.db";
        ContainerName = "users";
    }
}

Step 3: Create the User Manager

Create a UserManager class that injects UsersRepository to perform operations. In this class, add a new user, update it, and then delete it.

using System;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;

public class UserManager
{
    private readonly IUsersRepository _usersRepository;
    private readonly ILogger<UserManager> _logger;

    public UserManager(IUsersRepository usersRepository, ILogger<UserManager> logger)
    {
        _usersRepository = usersRepository;
        _logger = logger;
    }

    public async Task Execute(CancellationToken cancellationToken = default)
    {
        // Create a new user document.
        var user = new UserDocument
        {
            Id = Guid.NewGuid().ToString(),
            Name = "John Doe",
            Email = "john@example.com"
        };

        _logger.LogInformation("Adding user with Id: {UserId}", user.Id);
        await _usersRepository.AddItem(user, cancellationToken);

        // Update the user.
        user.Email = "john.doe@example.com";
        _logger.LogInformation("Updating user with Id: {UserId}", user.Id);
        await _usersRepository.UpdateItem(user, cancellationToken);

        // Delete the user.
        _logger.LogInformation("Deleting user with Id: {UserId}", user.Id);
        await _usersRepository.DeleteItem(user.Id, cancellationToken);
    }
}
Product Compatible and additional computed target framework versions.
.NET 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 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

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
3.0.341 121 9/10/2025
3.0.340 121 9/9/2025
3.0.339 121 9/9/2025
3.0.338 119 9/9/2025
3.0.337 122 9/9/2025
3.0.336 75 9/5/2025
3.0.335 83 9/5/2025
3.0.334 137 9/4/2025
3.0.333 135 9/3/2025
3.0.332 139 9/3/2025
3.0.331 139 9/3/2025
3.0.330 125 8/21/2025
3.0.329 121 8/20/2025
3.0.328 100 8/17/2025
3.0.327 105 8/16/2025
3.0.326 76 8/15/2025
3.0.325 107 8/15/2025
3.0.324 119 8/15/2025
3.0.323 123 8/15/2025
3.0.322 130 8/12/2025
3.0.321 130 8/12/2025
3.0.320 128 8/12/2025
3.0.319 130 8/11/2025
3.0.318 131 8/11/2025
3.0.317 124 8/11/2025
3.0.316 127 8/11/2025
3.0.315 204 8/6/2025
3.0.314 203 8/5/2025
3.0.313 213 8/5/2025
3.0.312 213 8/5/2025
3.0.311 209 8/5/2025
3.0.310 191 8/5/2025
3.0.309 192 8/5/2025
3.0.308 93 7/30/2025
3.0.307 91 7/29/2025
3.0.306 142 7/9/2025
3.0.305 139 7/9/2025
3.0.304 138 7/9/2025
3.0.303 141 7/9/2025
3.0.302 145 7/8/2025
3.0.301 139 7/8/2025
3.0.300 72 7/5/2025
3.0.299 138 7/3/2025
3.0.298 136 7/1/2025
3.0.297 95 6/29/2025
3.0.296 91 6/28/2025
3.0.295 98 6/28/2025
3.0.294 66 6/28/2025
3.0.293 65 6/28/2025
3.0.292 68 6/27/2025
3.0.291 86 6/27/2025
3.0.290 138 6/25/2025
3.0.289 140 6/25/2025
3.0.288 136 6/24/2025
3.0.287 284 6/12/2025
3.0.286 294 6/11/2025
3.0.285 282 6/11/2025
3.0.284 283 6/11/2025
3.0.283 282 6/11/2025
3.0.282 287 6/11/2025
3.0.281 143 6/3/2025
3.0.280 143 6/3/2025
3.0.279 140 6/2/2025
3.0.278 154 5/28/2025
3.0.277 145 5/28/2025
3.0.276 151 5/28/2025
3.0.275 143 5/27/2025
3.0.274 142 5/27/2025
3.0.273 141 5/27/2025
3.0.272 143 5/27/2025
3.0.271 147 5/25/2025
3.0.270 112 5/25/2025
3.0.269 83 5/23/2025
3.0.268 94 5/23/2025
3.0.267 114 5/23/2025
3.0.266 128 5/23/2025
3.0.265 124 5/23/2025
3.0.264 129 5/23/2025
3.0.263 143 5/22/2025
3.0.262 159 5/19/2025
3.0.261 148 5/18/2025
3.0.260 119 5/18/2025
3.0.259 225 5/15/2025
3.0.258 240 5/15/2025
3.0.257 232 5/14/2025
3.0.256 246 5/14/2025
3.0.255 234 5/14/2025
3.0.254 228 5/14/2025
3.0.253 230 5/13/2025
3.0.252 228 5/13/2025
3.0.251 141 5/9/2025
3.0.250 151 5/8/2025
3.0.249 143 5/8/2025
3.0.248 142 5/8/2025
3.0.247 144 5/8/2025
3.0.246 164 5/8/2025
3.0.245 146 5/7/2025
3.0.244 152 5/6/2025
3.0.243 144 5/6/2025
3.0.242 144 5/5/2025
3.0.241 154 5/5/2025
3.0.240 148 5/5/2025
3.0.239 146 5/5/2025
3.0.238 151 5/5/2025
3.0.237 147 5/5/2025
3.0.236 144 5/5/2025
3.0.235 151 5/5/2025
3.0.234 146 5/5/2025
3.0.233 140 4/27/2025
3.0.232 122 4/26/2025
3.0.231 92 4/26/2025
3.0.230 175 4/10/2025
3.0.229 180 4/9/2025
3.0.228 172 4/9/2025
3.0.227 171 4/9/2025
3.0.226 174 4/9/2025
3.0.225 162 4/9/2025
3.0.224 181 4/8/2025
3.0.223 166 4/8/2025
3.0.222 146 4/8/2025
3.0.221 172 4/8/2025
3.0.220 167 4/8/2025
3.0.219 171 4/8/2025
3.0.218 164 4/8/2025
3.0.217 151 4/8/2025
3.0.216 160 4/8/2025
3.0.215 161 4/8/2025
3.0.214 162 4/8/2025
3.0.213 160 4/8/2025
3.0.212 165 4/8/2025
3.0.211 168 4/8/2025
3.0.210 172 4/8/2025
3.0.209 169 4/7/2025
3.0.208 161 4/7/2025
3.0.207 180 4/7/2025
3.0.206 167 4/7/2025
3.0.205 173 4/7/2025
3.0.204 164 4/7/2025
3.0.203 173 4/7/2025
3.0.202 171 4/7/2025
3.0.201 168 4/7/2025
3.0.200 171 4/7/2025
3.0.199 171 4/6/2025
3.0.198 166 4/6/2025
3.0.197 144 4/6/2025
3.0.196 140 4/6/2025
3.0.195 123 4/6/2025
3.0.194 115 4/6/2025
3.0.193 115 4/5/2025
3.0.192 91 4/5/2025
3.0.191 108 4/5/2025
3.0.190 112 4/5/2025
3.0.189 94 4/5/2025
3.0.188 103 4/5/2025
3.0.187 108 4/5/2025
3.0.186 105 4/4/2025
3.0.185 129 4/4/2025
3.0.184 136 4/4/2025
3.0.183 131 4/4/2025
3.0.182 155 4/4/2025
3.0.181 153 4/4/2025
3.0.180 170 4/2/2025
3.0.179 170 4/2/2025
3.0.178 160 4/2/2025
3.0.177 158 4/2/2025
3.0.176 156 4/1/2025
3.0.175 166 4/1/2025
3.0.174 175 4/1/2025
3.0.173 155 4/1/2025
3.0.172 154 4/1/2025
3.0.171 168 4/1/2025
3.0.170 161 4/1/2025
3.0.169 154 4/1/2025
3.0.168 167 4/1/2025
3.0.167 161 3/31/2025
3.0.166 156 3/31/2025
3.0.165 164 3/31/2025
3.0.164 161 3/31/2025
3.0.163 150 3/30/2025
3.0.162 149 3/30/2025
3.0.161 158 3/30/2025
3.0.160 148 3/29/2025
3.0.159 102 3/29/2025
3.0.158 95 3/29/2025
3.0.157 98 3/29/2025
3.0.156 103 3/29/2025
3.0.155 153 3/27/2025
3.0.154 138 3/27/2025
3.0.153 135 3/27/2025
3.0.152 142 3/27/2025
3.0.151 165 3/27/2025
3.0.150 467 3/26/2025
3.0.149 476 3/26/2025
3.0.148 482 3/26/2025
3.0.147 469 3/25/2025
3.0.146 469 3/25/2025
3.0.145 474 3/25/2025
3.0.144 494 3/25/2025
3.0.143 96 3/22/2025
3.0.142 85 3/21/2025
3.0.141 90 3/21/2025
3.0.140 101 3/21/2025
3.0.139 123 3/21/2025
3.0.138 118 3/21/2025
3.0.137 140 3/21/2025
3.0.136 154 3/19/2025
3.0.135 157 3/19/2025
3.0.134 158 3/19/2025
3.0.133 148 3/19/2025
3.0.132 145 3/18/2025
3.0.131 146 3/18/2025
3.0.130 145 3/18/2025
3.0.129 151 3/18/2025
3.0.128 145 3/18/2025
3.0.127 158 3/18/2025
3.0.126 142 3/16/2025
3.0.125 138 3/16/2025
3.0.124 75 3/15/2025
3.0.123 72 3/15/2025
3.0.122 82 3/15/2025
3.0.121 72 3/15/2025
3.0.120 84 3/15/2025
3.0.119 84 3/15/2025
3.0.118 76 3/15/2025
3.0.117 72 3/15/2025
3.0.116 106 3/14/2025
3.0.115 150 3/13/2025
3.0.114 166 3/13/2025
3.0.113 164 3/12/2025
3.0.112 169 3/12/2025
3.0.111 167 3/12/2025
3.0.110 163 3/12/2025
3.0.109 168 3/12/2025
3.0.108 184 3/12/2025
3.0.107 168 3/12/2025
3.0.106 171 3/12/2025
3.0.105 167 3/12/2025
3.0.104 180 3/12/2025
3.0.103 175 3/12/2025
3.0.102 187 3/11/2025
3.0.101 176 3/11/2025
3.0.100 178 3/11/2025
3.0.99 173 3/11/2025
3.0.98 185 3/11/2025
3.0.97 170 3/11/2025
3.0.96 178 3/11/2025
3.0.95 183 3/11/2025
3.0.94 173 3/11/2025
3.0.93 217 3/7/2025
3.0.92 224 3/7/2025
3.0.91 211 3/7/2025
3.0.90 227 3/7/2025
3.0.89 225 3/7/2025
3.0.88 219 3/7/2025
3.0.87 220 3/7/2025
3.0.86 228 3/7/2025
3.0.85 227 3/7/2025
3.0.84 239 3/7/2025
3.0.83 227 3/7/2025
3.0.82 208 3/7/2025
3.0.81 264 3/3/2025
3.0.80 128 3/3/2025
3.0.79 138 3/2/2025
3.0.78 140 3/2/2025
3.0.77 120 3/2/2025
3.0.76 108 3/2/2025
3.0.75 111 3/2/2025
3.0.74 107 3/2/2025
3.0.73 99 3/2/2025
3.0.72 106 3/2/2025
3.0.71 102 3/2/2025
3.0.70 110 3/2/2025
3.0.69 103 3/2/2025
3.0.68 103 3/1/2025
3.0.67 116 3/1/2025
3.0.66 105 3/1/2025
3.0.65 105 3/1/2025
3.0.64 107 3/1/2025
3.0.63 113 3/1/2025
3.0.62 96 3/1/2025
3.0.61 118 2/26/2025
3.0.60 120 2/26/2025
3.0.59 111 2/26/2025
3.0.58 110 2/26/2025
3.0.57 105 2/25/2025
3.0.56 112 2/25/2025
3.0.55 119 2/25/2025
3.0.54 113 2/25/2025
3.0.53 111 2/25/2025
3.0.52 107 2/25/2025
3.0.51 108 2/25/2025
3.0.50 104 2/25/2025
3.0.49 101 2/25/2025
3.0.48 100 2/25/2025
3.0.47 129 2/24/2025
3.0.46 154 2/23/2025
3.0.45 100 2/23/2025
3.0.44 102 2/23/2025
3.0.43 113 2/23/2025
3.0.42 103 2/23/2025
3.0.41 109 2/23/2025
3.0.40 103 2/23/2025
3.0.39 105 2/23/2025
3.0.38 98 2/23/2025
3.0.37 104 2/23/2025
3.0.36 107 2/23/2025
3.0.35 106 2/22/2025
3.0.34 106 2/22/2025
3.0.33 131 2/22/2025
3.0.32 107 2/22/2025
3.0.31 108 2/22/2025
3.0.30 114 2/22/2025
3.0.29 131 2/22/2025
3.0.28 113 2/22/2025
3.0.27 100 2/22/2025
3.0.26 114 2/22/2025
3.0.25 106 2/22/2025
3.0.24 103 2/22/2025
3.0.23 110 2/22/2025
3.0.22 114 2/21/2025
3.0.21 116 2/21/2025
3.0.20 114 2/21/2025
3.0.19 111 2/21/2025
3.0.18 106 2/21/2025
3.0.17 114 2/20/2025
3.0.16 124 2/19/2025
3.0.15 135 2/19/2025
3.0.14 112 2/19/2025
3.0.13 114 2/19/2025
3.0.12 132 2/19/2025
3.0.11 116 2/19/2025
3.0.10 119 2/19/2025
3.0.9 110 2/19/2025
3.0.8 116 2/19/2025
3.0.7 127 2/18/2025
3.0.6 115 2/18/2025
3.0.5 111 2/18/2025
3.0.4 130 2/17/2025
3.0.3 115 2/17/2025
3.0.2 115 2/17/2025
3.0.1 112 2/17/2025