Purview.EventSourcing.InMemory 2.0.0-prerelease.32

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

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 collection
  • InMemorySnapshotStore<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.
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
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