Ax.Fw.Storage 14.5.276

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

Ax.Fw.Storage

Simple document database; based on SQLite

Why?

I just wanted to create an instance of class and be able to write to database, read from database, enumerate elements in database by key without thinking about "this database's BSON don't support ImmutableDictionary, meh", "that database doesn't support numeric keys, meh", "ah, I can't search for values of integer column using unsigned integer variable, meh" and so on. Why not "key-value" storage? I also wanted to filter my objects by last changed time. That's it. This document storage engine is not as fast as more "strongly-typed" databases (I think it's 1.1 - 1.5x slower in some scenarios), but it is reliable as any SQLite database.

Usage example:

// we need CancellationToken
var ct = default(CancellationToken);

// path to database file
var dbFile = "/home/user/data.db"

try
{
    // create database or open existing
    using var storage = new SqliteDocumentStorage(dbFile);

    // create document; pair 'namespace - key' is unique; any json serializable data can be stored
    var doc = await storage.WriteDocumentAsync(_namespace: "default", _key: "test-key", _data: "test-data-0", ct);

    // retrieve data
    var readDoc = await storage.ReadDocumentAsync(_namespace: "default", _key: "test-key", ct);

    Assert.Equal("test-data-0", readDoc?.Data.ToObject<string>());

    // there are also 'simple' documents; 
    // namespace of simple documents is automatically determined by data type or by `SimpleDocumentAttribute`
    var simpleDoc = await storage.WriteSimpleDocumentAsync(_entryId: 123, _data: "test_data", ct);

    var readSimpleDoc = await storage.ReadSimpleDocumentAsync<string>(_entryId: 123, ct);

    Assert.Equal("test_data", readSimpleDoc?.Data);

    // you also can attach in-memory cache to document storage
    // cache makes read operations significantly faster
    using var cachedStorage = storage.WithCache(_maxValuesCached: 1000, _cacheTtl: TimeSpan.FromSeconds(60));

    // you also can attach retention rules to document storage
    // documents older than certain age will be automatically deleted
    using var storageWithRules = storage
      .WithRetentionRules(TimeSpan.FromHours(1), TimeSpan.FromHours(1), TimeSpan.FromMinutes(10));
}
finally
{
    new FileInfo(dbFile).TryDelete();
}
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 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
14.5.277 81 1/24/2026
14.5.276 77 1/24/2026
14.5.275 86 1/23/2026
14.5.274 78 1/23/2026
14.5.272 78 1/23/2026
14.5.271 83 1/23/2026
14.5.269 104 1/17/2026
14.5.268 86 1/17/2026
14.5.266 88 1/16/2026
14.5.263 99 12/31/2025
14.5.262 188 12/24/2025
14.5.261 189 12/24/2025
14.5.260 179 12/23/2025
14.5.258 219 9/6/2025
14.5.257 459 8/6/2025
14.5.256 245 6/19/2025
14.5.255 204 6/19/2025
14.5.254 359 6/12/2025
14.5.252 242 5/11/2025
14.5.251 222 5/8/2025
14.5.250 228 5/8/2025
14.5.249 229 5/8/2025
14.5.248 229 5/8/2025
14.5.247 271 2/8/2025
14.5.246 191 2/8/2025
14.5.245 194 2/7/2025
14.5.244 182 1/29/2025
14.5.242 179 1/29/2025
14.5.241 187 1/29/2025
14.4.240 271 11/2/2024
14.4.239 273 10/18/2024
14.4.237 209 9/19/2024
14.4.236 251 8/11/2024
14.3.235 226 8/10/2024
14.3.234 186 8/5/2024
14.3.233 190 7/29/2024
14.3.232 203 7/23/2024
14.3.231 204 7/22/2024
14.3.230 214 7/17/2024
14.3.229 190 7/17/2024
14.3.228 203 7/11/2024
14.3.227 211 7/10/2024
14.3.226 236 7/3/2024
14.3.225 224 6/14/2024
14.3.224 188 6/7/2024
14.3.223 215 6/6/2024
14.3.222 226 5/17/2024
14.3.221 248 4/12/2024
14.2.219 221 4/11/2024
14.2.218 209 4/10/2024
14.2.217 291 3/29/2024
14.2.216 235 3/27/2024
14.2.215 227 3/22/2024
14.1.212 223 3/11/2024
14.1.211 207 3/11/2024
14.1.210 218 3/6/2024
14.1.208 224 3/6/2024
14.1.206 255 3/2/2024
14.1.205 237 3/1/2024
14.0.204 235 2/19/2024
14.0.203 226 2/16/2024
14.0.201 249 2/15/2024
13.0.200 242 2/10/2024
13.0.199 221 2/10/2024
13.0.198 223 2/10/2024
13.0.197 400 12/10/2023
13.0.196 226 12/10/2023
13.0.195 231 12/9/2023
13.0.194 176 12/6/2023
13.0.192 178 12/5/2023
13.0.191 238 11/26/2023
13.0.189 181 11/24/2023
13.0.186 198 11/23/2023
13.0.185 202 11/22/2023
13.0.182 197 11/18/2023
13.0.181 241 11/14/2023
13.0.180 1,046 11/12/2023
13.0.179 177 11/10/2023
12.1.178 213 10/25/2023
12.1.177 205 10/24/2023
12.1.176 203 10/21/2023
12.1.175 206 10/21/2023
12.1.173 206 10/16/2023
12.1.172 236 10/15/2023
12.1.171 201 10/15/2023
12.1.170 209 10/15/2023
12.1.168 214 10/15/2023
12.1.167 184 10/14/2023
12.1.166 266 9/7/2023
12.1.165 283 8/28/2023
12.1.164 325 8/15/2023
12.1.163 279 8/14/2023
12.1.162 252 8/14/2023
12.1.161 311 6/20/2023
12.1.160 317 6/10/2023
12.1.158 288 5/31/2023
12.1.157 278 5/22/2023
12.1.7 287 5/21/2023
12.1.0 280 5/19/2023
12.0.21 298 5/18/2023
12.0.20 276 5/18/2023
12.0.19 294 5/10/2023
12.0.18 273 5/4/2023
12.0.17 297 5/3/2023
12.0.16 311 4/30/2023
12.0.15 310 4/30/2023
12.0.13 319 4/27/2023
12.0.12 322 4/27/2023
12.0.10 377 4/15/2023
12.0.9 373 4/6/2023
12.0.8 368 3/27/2023
12.0.7 368 3/27/2023
12.0.3 372 3/22/2023
12.0.2 370 3/22/2023
12.0.1 399 3/1/2023
12.0.0 438 2/11/2023
11.1.10 419 2/11/2023
11.1.9 416 2/10/2023
11.1.8 410 2/6/2023
11.1.7 415 2/5/2023
11.1.6 426 2/4/2023
11.1.5 427 2/4/2023
11.1.4 458 12/30/2022
11.1.3 494 12/26/2022
11.1.2 434 12/26/2022
11.1.1 458 12/25/2022
11.0.0 449 12/24/2022
1.0.0 473 12/24/2022