Anarchy.Toolkit.Infrastructure.Persistence.Db.Events 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Anarchy.Toolkit.Infrastructure.Persistence.Db.Events --version 1.0.0
                    
NuGet\Install-Package Anarchy.Toolkit.Infrastructure.Persistence.Db.Events -Version 1.0.0
                    
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="Anarchy.Toolkit.Infrastructure.Persistence.Db.Events" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Anarchy.Toolkit.Infrastructure.Persistence.Db.Events" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Anarchy.Toolkit.Infrastructure.Persistence.Db.Events" />
                    
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 Anarchy.Toolkit.Infrastructure.Persistence.Db.Events --version 1.0.0
                    
#r "nuget: Anarchy.Toolkit.Infrastructure.Persistence.Db.Events, 1.0.0"
                    
#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 Anarchy.Toolkit.Infrastructure.Persistence.Db.Events@1.0.0
                    
#: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=Anarchy.Toolkit.Infrastructure.Persistence.Db.Events&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Anarchy.Toolkit.Infrastructure.Persistence.Db.Events&version=1.0.0
                    
Install as a Cake Tool

Anarchy.Toolkit.Infrastructure.Persistence.Db.Events

Part of Anarchy I/O Toolkit, a .NET developer platform · Pillar: Infrastructure · Layer: Infrastructure · Package catalog

Provider-agnostic repository contracts and bases for a relational domain event store, and contracts for a transactional task outbox. This package builds on Infrastructure.Persistence.Db and Core.Events. Applications own their schema and supply concrete repositories and provider-specific embedded SQL.

dotnet add package Anarchy.Toolkit.Infrastructure.Persistence.Db.Events

How to use it

  • Derive domain event writers from DbEventWriterRepositoryBase and readers from DbDomainEventReaderRepositoryBase.
  • Implement the outbox reader and writer contracts in the application. Save tasks in the same unit-of-work transaction as the business changes, then use a relay to publish the pending tasks.
  • Ship the DomainEvent.Get.* and auxiliary type-table queries described on the event repository bases. Type identifiers are resolved against the caller's database and active transaction on every lookup; no identifier is shared across lookups. The provider's get-or-insert SQL and database unique constraints coordinate concurrent registration. A rollback handler is not required for this resolution path.

SQL contract for custom attributes

IEventEnvelope.CustomAttributes is stored separately from event data as a JSON object with string values. Add a text/JSON column (for example custom_attributes) to the event table. The column may be nullable: a SQL NULL is read as an empty attribute dictionary.

  • The concrete domain event writer must serialize CustomAttributes and bind the JSON text in its insert query.
  • Every event query returning a DomainEventDbRecord must select the column as a string aliased CustomAttributes. Cast a native JSON column to text where the driver requires it.
  • Outbox implementations define their own schema, serialization, duplicate handling, retention and cleanup policy.

Releases

See the release notes for the complete release history.

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 51 11/27/2026
1.0.0 61 11/24/2026

## Releases

### 1.0.0

- Introduce relational event-store repository bases, Outbox contracts and records, a type identifier resolver, and a rollback handler.
- Support round-tripping event custom attributes through consumer-owned SQL as a JSON object.