Purview.EventSourcing.InMemory
2.0.0-prerelease.32
dotnet add package Purview.EventSourcing.InMemory --version 2.0.0-prerelease.32
NuGet\Install-Package Purview.EventSourcing.InMemory -Version 2.0.0-prerelease.32
<PackageReference Include="Purview.EventSourcing.InMemory" Version="2.0.0-prerelease.32" />
<PackageVersion Include="Purview.EventSourcing.InMemory" Version="2.0.0-prerelease.32" />
<PackageReference Include="Purview.EventSourcing.InMemory" />
paket add Purview.EventSourcing.InMemory --version 2.0.0-prerelease.32
#r "nuget: Purview.EventSourcing.InMemory, 2.0.0-prerelease.32"
#:package Purview.EventSourcing.InMemory@2.0.0-prerelease.32
#addin nuget:?package=Purview.EventSourcing.InMemory&version=2.0.0-prerelease.32&prerelease
#tool nuget:?package=Purview.EventSourcing.InMemory&version=2.0.0-prerelease.32&prerelease
Purview.EventSourcing.InMemory
Purview.EventSourcing.InMemory provides in-memory event and snapshot stores for Purview EventSourcing. It is intended for development, testing, and prototyping; data is not persisted across process restarts.
Install
dotnet add package Purview.EventSourcing.InMemory
Register the stores
Event store only
Registers the event store against the non-queryable store contracts (IEventStoreCore<T>, INonQueryableEventStore<T>, IInMemoryEventStore<T>) and the non-generic IEventStore facade.
builder.Services.AddInMemoryEventStore();
Event store with in-memory snapshots
Registers the snapshot store against both the non-queryable and queryable contracts (IQueryableEventStoreCore<T>, IInMemorySnapshotStore<T>), plus the IQueryableEventStore facade. Aggregate state is cached in a snapshot that is rebuilt from events on demand.
builder.Services.AddInMemorySnapshotEventStore();
Typical usage
var order = await store.GetAsync<OrderAggregate>(orderId, cancellationToken);
if (order is null)
{
order = await store.CreateAsync<OrderAggregate>(orderId, cancellationToken);
order.CreateOrder(customerId);
await store.SaveAsync(order, cancellationToken);
}
What it provides
InMemoryEventStore<T>- event-stream persistence backed by an in-memory collectionInMemorySnapshotStore<T>- snapshot-backed queryable reads plus event-stream persistence- Transient service registrations, so each resolution gets a fresh store instance
Limitations
- Data is lost when the process exits.
- The stores are not distributed or durable; do not use them in production workloads.
- Snapshot-backed reads and event persistence are not transactional across processes.
Related packages
- Core package:
Purview.EventSourcing - Provider feature matrix
| 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.Caching.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.12)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Options (>= 10.0.12)
- Microsoft.Extensions.Telemetry.Abstractions (>= 10.10.0)
- Purview.EventSourcing (>= 2.0.0-prerelease.32)
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 |
|---|---|---|
| 2.0.0-prerelease.32 | 37 | 9/15/2026 |
| 2.0.0-prerelease.31 | 53 | 9/12/2026 |
| 2.0.0-prerelease.30 | 61 | 9/8/2026 |
| 2.0.0-prerelease.29 | 77 | 8/3/2026 |
| 2.0.0-prerelease.28 | 86 | 7/20/2026 |
| 2.0.0-prerelease.27 | 62 | 7/20/2026 |
| 2.0.0-prerelease.26 | 65 | 7/20/2026 |
| 2.0.0-prerelease.25 | 66 | 7/20/2026 |
| 2.0.0-prerelease.23 | 63 | 7/20/2026 |
| 2.0.0-prerelease.22 | 68 | 7/19/2026 |
| 2.0.0-prerelease.21 | 87 | 6/26/2026 |
| 2.0.0-prerelease.20 | 75 | 6/26/2026 |
| 2.0.0-prerelease.19 | 74 | 6/26/2026 |
| 2.0.0-prerelease.18 | 86 | 6/25/2026 |