EventSourcing is a small .NET event sourcing framework with runtime packages and compile-time source generators.
The framework stores events, rebuilds aggregate state from event streams and executes projections after successful writes. The source generators keep the mapping, aggregation, repository and projection infrastructure explicit at compile time instead of relying on reflection-heavy runtime discovery.
| Package | Purpose |
|---|---|
EventSourcing.Abstractions |
Contracts, marker attributes and shared abstractions for domain projects. |
EventSourcing |
Runtime package with repositories, stores, EF Core integration and dependency injection support. |
EventSourcing.SourceGenerators |
Source generators, analyzers and code fixes for repositories, mappers, aggregators, projectors and DI extensions. |
EventSourcing.Publishers |
Shared publisher abstractions for projection-based event publishing. |
EventSourcing.Publishers.RabbitMQ |
RabbitMQ publisher implementation for events and aggregate state. |
Install the runtime and source-generator package in the infrastructure project that declares repositories.
<PackageReference Include="EventSourcing" Version="2.0.0" />
<PackageReference Include="EventSourcing.SourceGenerators" Version="2.0.0" PrivateAssets="all" />Domain projects usually only need EventSourcing.Abstractions.
<PackageReference Include="EventSourcing.Abstractions" Version="2.0.0" />Define events and aggregates in the domain layer, declare partial repositories in the infrastructure layer and implement the generated projection classes. The full flow is described in Getting Started.
dotnet restore
dotnet buildPull request validation builds the solution and runs the non-RabbitMQ test suite. Package publishing is handled separately from pull request validation.