Papst.EventStore.InMemory
7.0.12
dotnet add package Papst.EventStore.InMemory --version 7.0.12
NuGet\Install-Package Papst.EventStore.InMemory -Version 7.0.12
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="Papst.EventStore.InMemory" Version="7.0.12" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Papst.EventStore.InMemory" Version="7.0.12" />
<PackageReference Include="Papst.EventStore.InMemory" />
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 Papst.EventStore.InMemory --version 7.0.12
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Papst.EventStore.InMemory, 7.0.12"
#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 Papst.EventStore.InMemory@7.0.12
#: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=Papst.EventStore.InMemory&version=7.0.12
#tool nuget:?package=Papst.EventStore.InMemory&version=7.0.12
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
InMemory Implementation for the Papst.EventStore
This is an in-memory implementation of the Papst.EventStore that can be used for testing purposes.
Usage
High-Level Event Store (IEventStore)
IServiceCollection services = new ServiceCollection();
services.AddInMemoryEventStore();
var serviceProvider = services.BuildServiceProvider();
var eventStore = serviceProvider.GetRequiredService<IEventStore>();
Low-Level Event Store (ILowLevelEventStore)
For handling events as raw JSON objects without type information:
IServiceCollection services = new ServiceCollection();
services.AddInMemoryEventStore();
var serviceProvider = services.BuildServiceProvider();
var lowLevelEventStore = serviceProvider.GetRequiredService<ILowLevelEventStore>();
// Create a stream
var streamId = Guid.NewGuid();
var stream = await lowLevelEventStore.CreateAsync(streamId, "MyAggregate");
// Append a low-level event (as JObject)
var evt = JObject.Parse(@"{ ""name"": ""John"", ""age"": 30 }");
await stream.AppendAsync(Guid.NewGuid(), "UserCreated", evt);
Deleting an Event Stream
DeleteAsync removes the stream from the in-memory dictionary. Because the InMemory store is not persisted, this simply drops the stream and all of its events from memory:
await eventStore.DeleteAsync(streamId);
If the stream does not exist, an EventStreamNotFoundException is thrown. The delete action is logged (Information level) via the store's ILogger.
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Microsoft.Extensions.DependencyInjection (>= 10.0.11)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.11)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.11)
- Microsoft.Extensions.Options (>= 10.0.11)
- Newtonsoft.Json (>= 13.0.4)
- Papst.EventStore (>= 7.0.3 && < 8.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 |
|---|---|---|
| 7.0.12 | 121 | 9/19/2026 |
| 7.0.4 | 134 | 8/18/2026 |
| 6.4.5 | 138 | 8/10/2026 |
| 6.3.3 | 155 | 8/2/2026 |
| 6.2.2 | 122 | 7/19/2026 |
| 6.1.2 | 189 | 5/16/2026 |
| 6.0.14 | 171 | 5/6/2026 |
| 6.0.11 | 123 | 5/2/2026 |
| 6.0.9 | 136 | 4/12/2026 |
| 6.0.4 | 129 | 4/11/2026 |
| 6.0.3 | 124 | 4/11/2026 |
| 5.4.9 | 216 | 2/13/2026 |
| 5.4.3 | 144 | 1/7/2026 |
| 5.3.6 | 140 | 1/2/2026 |
| 5.2.36 | 360 | 9/22/2025 |
| 5.2.32 | 223 | 6/3/2025 |
| 5.2.30 | 196 | 2/12/2025 |
| 5.2.28 | 193 | 2/9/2025 |
| 5.2.25 | 189 | 2/9/2025 |
| 5.2.23 | 198 | 2/9/2025 |
Loading failed