Soenneker.Zelos.Suite 3.0.174

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.174
                    
NuGet\Install-Package Soenneker.Zelos.Suite -Version 3.0.174
                    
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.174" />
                    
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.174" />
                    
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.174
                    
#r "nuget: Soenneker.Zelos.Suite, 3.0.174"
                    
#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.174
                    
#: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.174
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Zelos.Suite&version=3.0.174
                    
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.344 44 9/17/2025
3.0.343 41 9/16/2025
3.0.342 45 9/16/2025
3.0.341 128 9/10/2025
3.0.340 127 9/9/2025
3.0.339 127 9/9/2025
3.0.338 126 9/9/2025
3.0.337 128 9/9/2025
3.0.336 76 9/5/2025
3.0.335 84 9/5/2025
3.0.334 138 9/4/2025
3.0.333 136 9/3/2025
3.0.332 140 9/3/2025
3.0.331 140 9/3/2025
3.0.330 126 8/21/2025
3.0.329 122 8/20/2025
3.0.328 101 8/17/2025
3.0.327 106 8/16/2025
3.0.326 77 8/15/2025
3.0.325 108 8/15/2025
3.0.324 120 8/15/2025
3.0.323 124 8/15/2025
3.0.322 131 8/12/2025
3.0.321 131 8/12/2025
3.0.320 129 8/12/2025
3.0.319 131 8/11/2025
3.0.318 132 8/11/2025
3.0.317 125 8/11/2025
3.0.316 128 8/11/2025
3.0.315 205 8/6/2025
3.0.314 204 8/5/2025
3.0.313 214 8/5/2025
3.0.312 214 8/5/2025
3.0.311 210 8/5/2025
3.0.310 192 8/5/2025
3.0.309 194 8/5/2025
3.0.308 94 7/30/2025
3.0.307 92 7/29/2025
3.0.306 143 7/9/2025
3.0.305 140 7/9/2025
3.0.304 139 7/9/2025
3.0.303 142 7/9/2025
3.0.302 147 7/8/2025
3.0.301 140 7/8/2025
3.0.300 73 7/5/2025
3.0.299 139 7/3/2025
3.0.298 137 7/1/2025
3.0.297 96 6/29/2025
3.0.296 92 6/28/2025
3.0.295 99 6/28/2025
3.0.294 67 6/28/2025
3.0.293 66 6/28/2025
3.0.292 69 6/27/2025
3.0.291 87 6/27/2025
3.0.290 139 6/25/2025
3.0.289 141 6/25/2025
3.0.288 137 6/24/2025
3.0.287 285 6/12/2025
3.0.286 295 6/11/2025
3.0.285 283 6/11/2025
3.0.284 284 6/11/2025
3.0.283 283 6/11/2025
3.0.282 288 6/11/2025
3.0.281 144 6/3/2025
3.0.280 144 6/3/2025
3.0.279 141 6/2/2025
3.0.278 155 5/28/2025
3.0.277 146 5/28/2025
3.0.276 152 5/28/2025
3.0.275 144 5/27/2025
3.0.274 143 5/27/2025
3.0.273 142 5/27/2025
3.0.272 144 5/27/2025
3.0.271 148 5/25/2025
3.0.270 113 5/25/2025
3.0.269 84 5/23/2025
3.0.268 95 5/23/2025
3.0.267 115 5/23/2025
3.0.266 131 5/23/2025
3.0.265 125 5/23/2025
3.0.264 130 5/23/2025
3.0.263 144 5/22/2025
3.0.262 161 5/19/2025
3.0.261 149 5/18/2025
3.0.260 120 5/18/2025
3.0.259 226 5/15/2025
3.0.258 242 5/15/2025
3.0.257 233 5/14/2025
3.0.256 247 5/14/2025
3.0.255 235 5/14/2025
3.0.254 229 5/14/2025
3.0.253 232 5/13/2025
3.0.252 229 5/13/2025
3.0.251 142 5/9/2025
3.0.250 152 5/8/2025
3.0.249 144 5/8/2025
3.0.248 143 5/8/2025
3.0.247 146 5/8/2025
3.0.246 167 5/8/2025
3.0.245 147 5/7/2025
3.0.244 155 5/6/2025
3.0.243 145 5/6/2025
3.0.242 145 5/5/2025
3.0.241 155 5/5/2025
3.0.240 149 5/5/2025
3.0.239 147 5/5/2025
3.0.238 152 5/5/2025
3.0.237 148 5/5/2025
3.0.236 148 5/5/2025
3.0.235 153 5/5/2025
3.0.234 147 5/5/2025
3.0.233 140 4/27/2025
3.0.232 125 4/26/2025
3.0.231 92 4/26/2025
3.0.230 175 4/10/2025
3.0.229 183 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 182 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 172 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 181 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 178 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 124 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 110 4/5/2025
3.0.190 113 4/5/2025
3.0.189 94 4/5/2025
3.0.188 103 4/5/2025
3.0.187 109 4/5/2025
3.0.186 108 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 171 4/2/2025
3.0.179 171 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 177 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 170 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 154 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 469 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 495 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 119 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 86 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 171 3/12/2025
3.0.111 167 3/12/2025
3.0.110 164 3/12/2025
3.0.109 168 3/12/2025
3.0.108 185 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 188 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 221 3/7/2025
3.0.86 228 3/7/2025
3.0.85 227 3/7/2025
3.0.84 241 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 131 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 107 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 115 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 112 2/26/2025
3.0.57 105 2/25/2025
3.0.56 112 2/25/2025
3.0.55 121 2/25/2025
3.0.54 115 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 155 2/23/2025
3.0.45 100 2/23/2025
3.0.44 103 2/23/2025
3.0.43 114 2/23/2025
3.0.42 104 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 132 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 112 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 107 2/21/2025
3.0.17 114 2/20/2025
3.0.16 124 2/19/2025
3.0.15 136 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 117 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 130 2/18/2025
3.0.6 116 2/18/2025
3.0.5 111 2/18/2025
3.0.4 131 2/17/2025
3.0.3 116 2/17/2025
3.0.2 116 2/17/2025
3.0.1 112 2/17/2025