Chronix.EventRepository
1.0.1
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
<PackageReference Include="Chronix.EventRepository" Version="1.0.1" />
<PackageVersion Include="Chronix.EventRepository" Version="1.0.1" />
<PackageReference Include="Chronix.EventRepository" />
paket add Chronix.EventRepository --version 1.0.1
#r "nuget: Chronix.EventRepository, 1.0.1"
#:package Chronix.EventRepository@1.0.1
#addin nuget:?package=Chronix.EventRepository&version=1.0.1
#tool nuget:?package=Chronix.EventRepository&version=1.0.1
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 | Versions 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. |
-
net9.0
- EventStore.Client.Grpc.Streams (>= 23.3.8)
- Newtonsoft.Json (>= 13.0.3)
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.