Soenneker.Zelos.Suite 3.0.346

Prefix Reserved
dotnet add package Soenneker.Zelos.Suite --version 3.0.346
                    
NuGet\Install-Package Soenneker.Zelos.Suite -Version 3.0.346
                    
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.346" />
                    
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.346" />
                    
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.346
                    
#r "nuget: Soenneker.Zelos.Suite, 3.0.346"
                    
#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.346
                    
#: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.346
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Zelos.Suite&version=3.0.346
                    
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.346 161 10/1/2025
3.0.345 153 9/30/2025
3.0.344 295 9/17/2025
3.0.343 290 9/16/2025
3.0.342 289 9/16/2025
3.0.341 162 9/10/2025
3.0.340 161 9/9/2025
3.0.339 161 9/9/2025
3.0.338 160 9/9/2025
3.0.337 163 9/9/2025
3.0.336 110 9/5/2025
3.0.335 119 9/5/2025
3.0.334 173 9/4/2025
3.0.333 169 9/3/2025
3.0.332 172 9/3/2025
3.0.331 172 9/3/2025
3.0.330 157 8/21/2025
3.0.329 153 8/20/2025
3.0.328 132 8/17/2025
3.0.327 137 8/16/2025
3.0.326 108 8/15/2025
3.0.325 140 8/15/2025
3.0.324 141 8/15/2025
3.0.323 155 8/15/2025
3.0.322 153 8/12/2025
3.0.321 163 8/12/2025
3.0.320 160 8/12/2025
3.0.319 162 8/11/2025
3.0.318 163 8/11/2025
3.0.317 156 8/11/2025
3.0.316 159 8/11/2025
3.0.315 236 8/6/2025
3.0.314 235 8/5/2025
3.0.313 245 8/5/2025
3.0.312 235 8/5/2025
3.0.311 231 8/5/2025
3.0.310 224 8/5/2025
3.0.309 225 8/5/2025
3.0.308 115 7/30/2025
3.0.307 113 7/29/2025
3.0.306 163 7/9/2025
3.0.305 150 7/9/2025
3.0.304 159 7/9/2025
3.0.303 163 7/9/2025
3.0.302 168 7/8/2025
3.0.301 160 7/8/2025
3.0.300 93 7/5/2025
3.0.299 159 7/3/2025
3.0.298 157 7/1/2025
3.0.297 116 6/29/2025
3.0.296 112 6/28/2025
3.0.295 119 6/28/2025
3.0.294 87 6/28/2025
3.0.293 86 6/28/2025
3.0.292 79 6/27/2025
3.0.291 108 6/27/2025
3.0.290 160 6/25/2025
3.0.289 161 6/25/2025
3.0.288 157 6/24/2025
3.0.287 305 6/12/2025
3.0.286 315 6/11/2025
3.0.285 304 6/11/2025
3.0.284 304 6/11/2025
3.0.283 303 6/11/2025
3.0.282 308 6/11/2025
3.0.281 165 6/3/2025
3.0.280 165 6/3/2025
3.0.279 162 6/2/2025
3.0.278 175 5/28/2025
3.0.277 166 5/28/2025
3.0.276 172 5/28/2025
3.0.275 164 5/27/2025
3.0.274 164 5/27/2025
3.0.273 162 5/27/2025
3.0.272 164 5/27/2025
3.0.271 168 5/25/2025
3.0.270 141 5/25/2025
3.0.269 105 5/23/2025
3.0.268 116 5/23/2025
3.0.267 135 5/23/2025
3.0.266 155 5/23/2025
3.0.265 148 5/23/2025
3.0.264 150 5/23/2025
3.0.263 164 5/22/2025
3.0.262 184 5/19/2025
3.0.261 169 5/18/2025
3.0.260 136 5/18/2025
3.0.259 248 5/15/2025
3.0.258 258 5/15/2025
3.0.257 253 5/14/2025
3.0.256 257 5/14/2025
3.0.255 255 5/14/2025
3.0.254 239 5/14/2025
3.0.253 242 5/13/2025
3.0.252 250 5/13/2025
3.0.251 163 5/9/2025
3.0.250 172 5/8/2025
3.0.249 164 5/8/2025
3.0.248 163 5/8/2025
3.0.247 157 5/8/2025
3.0.246 194 5/8/2025
3.0.245 170 5/7/2025
3.0.244 185 5/6/2025
3.0.243 168 5/6/2025
3.0.242 165 5/5/2025
3.0.241 182 5/5/2025
3.0.240 169 5/5/2025
3.0.239 168 5/5/2025
3.0.238 172 5/5/2025
3.0.237 169 5/5/2025
3.0.236 178 5/5/2025
3.0.235 179 5/5/2025
3.0.234 168 5/5/2025
3.0.233 160 4/27/2025
3.0.232 152 4/26/2025
3.0.231 112 4/26/2025
3.0.230 195 4/10/2025
3.0.229 211 4/9/2025
3.0.228 192 4/9/2025
3.0.227 191 4/9/2025
3.0.226 200 4/9/2025
3.0.225 182 4/9/2025
3.0.224 196 4/8/2025
3.0.223 188 4/8/2025
3.0.222 168 4/8/2025
3.0.221 192 4/8/2025
3.0.220 192 4/8/2025
3.0.219 198 4/8/2025
3.0.218 186 4/8/2025
3.0.217 172 4/8/2025
3.0.216 181 4/8/2025
3.0.215 182 4/8/2025
3.0.214 183 4/8/2025
3.0.213 180 4/8/2025
3.0.212 185 4/8/2025
3.0.211 178 4/8/2025
3.0.210 192 4/8/2025
3.0.209 189 4/7/2025
3.0.208 182 4/7/2025
3.0.207 201 4/7/2025
3.0.206 188 4/7/2025
3.0.205 198 4/7/2025
3.0.204 185 4/7/2025
3.0.203 193 4/7/2025
3.0.202 203 4/7/2025
3.0.201 188 4/7/2025
3.0.200 191 4/7/2025
3.0.199 192 4/6/2025
3.0.198 186 4/6/2025
3.0.197 174 4/6/2025
3.0.196 160 4/6/2025
3.0.195 150 4/6/2025
3.0.194 136 4/6/2025
3.0.193 136 4/5/2025
3.0.192 101 4/5/2025
3.0.191 138 4/5/2025
3.0.190 141 4/5/2025
3.0.189 115 4/5/2025
3.0.188 129 4/5/2025
3.0.187 132 4/5/2025
3.0.186 133 4/4/2025
3.0.185 149 4/4/2025
3.0.184 157 4/4/2025
3.0.183 151 4/4/2025
3.0.182 176 4/4/2025
3.0.181 174 4/4/2025
3.0.180 199 4/2/2025
3.0.179 197 4/2/2025
3.0.178 180 4/2/2025
3.0.177 169 4/2/2025
3.0.176 176 4/1/2025
3.0.175 187 4/1/2025
3.0.174 208 4/1/2025
3.0.173 166 4/1/2025
3.0.172 175 4/1/2025
3.0.171 189 4/1/2025
3.0.170 181 4/1/2025
3.0.169 175 4/1/2025
3.0.168 198 4/1/2025
3.0.167 181 3/31/2025
3.0.166 176 3/31/2025
3.0.165 185 3/31/2025
3.0.164 181 3/31/2025
3.0.163 170 3/30/2025
3.0.162 170 3/30/2025
3.0.161 180 3/30/2025
3.0.160 168 3/29/2025
3.0.159 133 3/29/2025
3.0.158 116 3/29/2025
3.0.157 109 3/29/2025
3.0.156 123 3/29/2025
3.0.155 180 3/27/2025
3.0.154 159 3/27/2025
3.0.153 155 3/27/2025
3.0.152 152 3/27/2025
3.0.151 181 3/27/2025
3.0.150 494 3/26/2025
3.0.149 504 3/26/2025
3.0.148 500 3/26/2025
3.0.147 479 3/25/2025
3.0.146 479 3/25/2025
3.0.145 495 3/25/2025
3.0.144 528 3/25/2025
3.0.143 116 3/22/2025
3.0.142 95 3/21/2025
3.0.141 101 3/21/2025
3.0.140 123 3/21/2025
3.0.139 134 3/21/2025
3.0.138 129 3/21/2025
3.0.137 165 3/21/2025
3.0.136 165 3/19/2025
3.0.135 177 3/19/2025
3.0.134 179 3/19/2025
3.0.133 158 3/19/2025
3.0.132 165 3/18/2025
3.0.131 166 3/18/2025
3.0.130 166 3/18/2025
3.0.129 161 3/18/2025
3.0.128 165 3/18/2025
3.0.127 175 3/18/2025
3.0.126 162 3/16/2025
3.0.125 158 3/16/2025
3.0.124 98 3/15/2025
3.0.123 92 3/15/2025
3.0.122 92 3/15/2025
3.0.121 93 3/15/2025
3.0.120 104 3/15/2025
3.0.119 110 3/15/2025
3.0.118 87 3/15/2025
3.0.117 83 3/15/2025
3.0.116 126 3/14/2025
3.0.115 160 3/13/2025
3.0.114 193 3/13/2025
3.0.113 185 3/12/2025
3.0.112 198 3/12/2025
3.0.111 182 3/12/2025
3.0.110 185 3/12/2025
3.0.109 191 3/12/2025
3.0.108 206 3/12/2025
3.0.107 188 3/12/2025
3.0.106 182 3/12/2025
3.0.105 178 3/12/2025
3.0.104 190 3/12/2025
3.0.103 192 3/12/2025
3.0.102 213 3/11/2025
3.0.101 197 3/11/2025
3.0.100 199 3/11/2025
3.0.99 193 3/11/2025
3.0.98 206 3/11/2025
3.0.97 180 3/11/2025
3.0.96 198 3/11/2025
3.0.95 195 3/11/2025
3.0.94 183 3/11/2025
3.0.93 238 3/7/2025
3.0.92 234 3/7/2025
3.0.91 231 3/7/2025
3.0.90 238 3/7/2025
3.0.89 246 3/7/2025
3.0.88 229 3/7/2025
3.0.87 231 3/7/2025
3.0.86 249 3/7/2025
3.0.85 253 3/7/2025
3.0.84 255 3/7/2025
3.0.83 243 3/7/2025
3.0.82 219 3/7/2025
3.0.81 264 3/3/2025
3.0.80 157 3/3/2025
3.0.79 148 3/2/2025
3.0.78 151 3/2/2025
3.0.77 140 3/2/2025
3.0.76 118 3/2/2025
3.0.75 132 3/2/2025
3.0.74 117 3/2/2025
3.0.73 119 3/2/2025
3.0.72 118 3/2/2025
3.0.71 122 3/2/2025
3.0.70 121 3/2/2025
3.0.69 123 3/2/2025
3.0.68 113 3/1/2025
3.0.67 136 3/1/2025
3.0.66 125 3/1/2025
3.0.65 126 3/1/2025
3.0.64 132 3/1/2025
3.0.63 135 3/1/2025
3.0.62 106 3/1/2025
3.0.61 130 2/26/2025
3.0.60 141 2/26/2025
3.0.59 131 2/26/2025
3.0.58 139 2/26/2025
3.0.57 125 2/25/2025
3.0.56 112 2/25/2025
3.0.55 149 2/25/2025
3.0.54 141 2/25/2025
3.0.53 131 2/25/2025
3.0.52 117 2/25/2025
3.0.51 129 2/25/2025
3.0.50 124 2/25/2025
3.0.49 122 2/25/2025
3.0.48 110 2/25/2025
3.0.47 141 2/24/2025
3.0.46 177 2/23/2025
3.0.45 120 2/23/2025
3.0.44 114 2/23/2025
3.0.43 143 2/23/2025
3.0.42 115 2/23/2025
3.0.41 130 2/23/2025
3.0.40 123 2/23/2025
3.0.39 116 2/23/2025
3.0.38 118 2/23/2025
3.0.37 115 2/23/2025
3.0.36 118 2/23/2025
3.0.35 127 2/22/2025
3.0.34 126 2/22/2025
3.0.33 158 2/22/2025
3.0.32 137 2/22/2025
3.0.31 128 2/22/2025
3.0.30 134 2/22/2025
3.0.29 156 2/22/2025
3.0.28 133 2/22/2025
3.0.27 120 2/22/2025
3.0.26 134 2/22/2025
3.0.25 127 2/22/2025
3.0.24 113 2/22/2025
3.0.23 138 2/22/2025
3.0.22 139 2/21/2025
3.0.21 151 2/21/2025
3.0.20 124 2/21/2025
3.0.19 131 2/21/2025
3.0.18 127 2/21/2025
3.0.17 134 2/20/2025
3.0.16 151 2/19/2025
3.0.15 162 2/19/2025
3.0.14 122 2/19/2025
3.0.13 135 2/19/2025
3.0.12 157 2/19/2025
3.0.11 137 2/19/2025
3.0.10 139 2/19/2025
3.0.9 130 2/19/2025
3.0.8 136 2/19/2025
3.0.7 158 2/18/2025
3.0.6 137 2/18/2025
3.0.5 131 2/18/2025
3.0.4 151 2/17/2025
3.0.3 137 2/17/2025
3.0.2 136 2/17/2025
3.0.1 122 2/17/2025