Chronix.EventRepository 1.0.1

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

Chronix

Chronix is a modern .NET library that brings DDD-style aggregates, the Repository pattern, and Projections to EventStoreDB. It offers a clean and extensible way to build event-sourced systems with a focus on maintainability and developer experience.


✨ Features

  • ✅ Clean Repository pattern over EventStoreDB
  • ✅ Easily define aggregates, entities and value objects using Domain-Driven Design (DDD) principles
  • ✅ Append and retrieve events as aggregates with minimal boilerplate
  • ✅ Define projections alongside your domain
  • ✅ Pluggable serialization and stream naming

🚀 Getting Started

1. Install the NuGet Package

dotnet add package Chronix.EventRepository

🛠️ Configuring Dependency Injection

Chronix provides a simple way to register your aggregates and projections using the built-in IServiceCollection extensions.

Make sure you install the DI package:

dotnet add package Chronix.EventRepository.Extensions.DependencyInjection

2.1 ✅ Add an Event Repository

Registers an event repository for your aggregate, using the given stream prefix.

builder.Services.AddEventRepository<MyAggregate>("Member");

2.2 ✅ Add Repository + Scan for Projections

Scans the given assembly for any inline projections (e.g., read models or handlers) and wires them automatically.

builder.Services.AddEventRepository<MyAggregate>("Member", typeof(ProjectionAssemblyToScan));

2.2 ✅ Full Control: Configure the Builder

Gives you full access to the builder to register serializers, encrypters, metadata enrichers and other options.

builder.Services.AddEventRepository<MyAggregate>(
    "Member",
    typeof(ProjectionAssemblyToScan),
    (serviceProvider, builder) =>
    {
        builder.Encryption(new NoEncryptionEncrypter())
                .MetadataEnricher(new BasicMetadataEnricher())
                .Serializer(new AggregateRootSerializer())
                .Options(new EventRepositoryOptions
                {
                    AutoRevisionAfterNthEvent = 100
                });
    });
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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 (1)

Showing the top 1 NuGet packages that depend on Chronix.EventRepository:

Package Downloads
Chronix.EventRepository.Extensions.DependencyInjection

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.2 171 4/2/2025
1.0.1 165 4/2/2025
1.0.0 164 4/2/2025