Sylin.Koan.Data.Connector.InMemory 1.0.47

dotnet add package Sylin.Koan.Data.Connector.InMemory --version 1.0.47
                    
NuGet\Install-Package Sylin.Koan.Data.Connector.InMemory -Version 1.0.47
                    
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="Sylin.Koan.Data.Connector.InMemory" Version="1.0.47" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Sylin.Koan.Data.Connector.InMemory" Version="1.0.47" />
                    
Directory.Packages.props
<PackageReference Include="Sylin.Koan.Data.Connector.InMemory" />
                    
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 Sylin.Koan.Data.Connector.InMemory --version 1.0.47
                    
#r "nuget: Sylin.Koan.Data.Connector.InMemory, 1.0.47"
                    
#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 Sylin.Koan.Data.Connector.InMemory@1.0.47
                    
#: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=Sylin.Koan.Data.Connector.InMemory&version=1.0.47
                    
Install as a Cake Addin
#tool nuget:?package=Sylin.Koan.Data.Connector.InMemory&version=1.0.47
                    
Install as a Cake Tool

Sylin.Koan.Data.Connector.InMemory

Use this connector for fast, process-local Entity persistence in tests, conformance suites, and explicitly ephemeral development workflows.

Choose it when

  • losing all data at process exit is acceptable;
  • a test needs a real AddKoan() provider without files, containers, or remote services; or
  • provider-neutral behavior needs a deterministic in-memory oracle.

Do not choose it for durable application state, cross-process sharing, or production recovery.

Install

dotnet add package Sylin.Koan.Data.Connector.InMemory

The direct package reference expresses intent to use the ephemeral provider. Keep the application's ordinary Koan bootstrap; there is no provider-specific registration:

builder.Services.AddKoan();

Meaningful result

Define an Entity and use its normal persistence verbs:

public sealed class Todo : Entity<Todo>
{
    public string Title { get; set; } = "";
}

var saved = await new Todo { Title = "Prove the rule" }.Save();
var same = await Todo.Get(saved.Id);

The saved value is available to every repository in the same Koan host and disappears when that host exits. InMemory stores a serialized snapshot, so mutating the original or a loaded value does not silently mutate persistence; call Save() again to publish a change. No files, container, or remote service are created.

Selection

The provider identity is inmemory (memory is also recognized). It is a direct provider with priority -100, not an automatic fallback. A direct InMemory reference wins over a merely bundle-provided automatic floor. If several Data connectors are referenced directly, Koan applies the normal deterministic selection rules; pin the intended provider when application durability must not change as references grow:

{
  "Koan": {
    "Data": {
      "Sources": {
        "Default": { "Adapter": "inmemory" }
      }
    }
  }
}

Current capability boundary

  • process-local concurrent storage keyed by source, Entity root, and partition;
  • detached, polymorphism-safe Entity snapshots on every read and write;
  • in-memory filter execution;
  • bulk upsert and bulk delete;
  • ordered, non-atomic batch behavior with atomic requirements rejected before mutation; and
  • shared/container/database isolation modes through the common key-value family.

The connector does not advertise DataCaps.Query.ProviderBoundedPaging. AllStream and QueryStream reject correctively with QueryStreamRejectedException before yielding because paging an already resident full-source dictionary is not a provider-bounded stream.

Use All/Query for deliberately small test sets, or FirstPage/Page when a bounded result returned to test code is sufficient. Numbered pages do not create an unbounded-data performance guarantee.

Physical compatibility maps and StorageLifecycle: External reject correctively: an object-graph store has no legacy physical names or pre-existing provider-owned storage to open. These are connector-specific claims, not a promise that remote providers behave identically. The current connector suite passes 56/56.

For application conformance, prefer Sylin.Koan.Testing; it owns host isolation, partitions, and the capability-aware battery. See TECHNICAL.md for the exact storage and negotiation contract.

References

Atomic insertion

Atomic insertion uses the existing host-owned, source/root/partition store. ConcurrentDictionary.TryAdd provides the insert-only decision over detached snapshots; an identity collision never replaces or returns the existing row. This is a single-process guarantee, consistent with InMemory storage. Default numeric keys reject before persistence; assign an identity when the Entity cannot generate one.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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
1.0.47 63 9/13/2026
1.0.45 89 9/12/2026
1.0.43 84 9/12/2026
1.0.42 84 9/10/2026
1.0.39 87 9/10/2026
1.0.36 80 9/9/2026
1.0.33 85 9/9/2026
1.0.30 89 9/9/2026
1.0.25 83 9/9/2026
1.0.24 95 9/9/2026
1.0.20 94 9/5/2026
1.0.19 121 8/30/2026
1.0.18 102 8/30/2026
1.0.17 97 8/28/2026
1.0.16 88 8/28/2026
1.0.15 90 8/28/2026
1.0.14 97 8/28/2026
1.0.13 99 8/28/2026
1.0.11 99 8/27/2026
1.0.7 117 8/25/2026
Loading failed