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
<PackageReference Include="Sylin.Koan.Data.Connector.InMemory" Version="1.0.47" />
<PackageVersion Include="Sylin.Koan.Data.Connector.InMemory" Version="1.0.47" />
<PackageReference Include="Sylin.Koan.Data.Connector.InMemory" />
paket add Sylin.Koan.Data.Connector.InMemory --version 1.0.47
#r "nuget: Sylin.Koan.Data.Connector.InMemory, 1.0.47"
#:package Sylin.Koan.Data.Connector.InMemory@1.0.47
#addin nuget:?package=Sylin.Koan.Data.Connector.InMemory&version=1.0.47
#tool nuget:?package=Sylin.Koan.Data.Connector.InMemory&version=1.0.47
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 | Versions 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. |
-
net10.0
- Microsoft.Extensions.Configuration (>= 10.0.10)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.10)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 10.0.10)
- Microsoft.Extensions.Configuration.Json (>= 10.0.10)
- Microsoft.Extensions.DependencyInjection (>= 10.0.10)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Hosting (>= 10.0.10)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Logging (>= 10.0.10)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Logging.Console (>= 10.0.10)
- Microsoft.Extensions.Options (>= 10.0.10)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.10)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.10)
- Newtonsoft.Json (>= 13.0.4)
- Sylin.Koan.Core (>= 1.0.39 && < 2.0.0)
- Sylin.Koan.Data.Abstractions (>= 1.0.41 && < 2.0.0)
- Sylin.Koan.Data.Core (>= 1.0.73 && < 2.0.0)
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 |