Soenneker.Zelos.Suite 3.0.209

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