matt-bentley/AspNetCore.EventSourcing
45.2
Weak · 21 September 2026
2.3k
lines of production code
C#
primary language
4
measurements over time
What this system is
This system is an ASP.NET Core API implementing an Event Sourcing architecture backed by a single SQL Server database. It manages banking-related bounded contexts, specifically handling Customers, Accounts, and Transactions. The architecture has been streamlined to remove the previous Angular SPA, relying on the API as the sole presentation layer, while utilizing MediatR for command and query handling within a unit of work pattern.
Behavioural changes
Controllers now depend on MediatR ISender instead of IMediator
The API controllers (Accounts, Customers, Transactions) have been updated to inject MediatR's ISender interface rather than the full IMediator interface. This change restricts the controllers to only sending commands/queries, which enforces a clearer separation of concerns and prevents controllers from accidentally using IMediator methods like Publish or SendAsync with notifications. Additionally, a comment was added to the OpenAccountCommand to clarify that the UnitOfWork.CommitAsync call saves both the Account and AccountReadModel in the same transaction.
src/AspNetCore.EventSourcing.Api, src/AspNetCore.EventSourcing.Application · high confidence
Simplified architecture by removing Angular SPA and pipelines
The solution has been streamlined to focus on Event Sourcing with a single SQL Server database, removing the previous Angular SPA and associated CI/CD pipeline configurations. The API now serves as the sole presentation layer, and the README has been updated to reflect the Banking example with Customer and Account bounded contexts. Additionally, the serialization logic has been enhanced to support private property setters during JSON deserialization, and the unit of work now relies on the generic IPublisher interface instead of MediatR's IMediator.
(repo-wide) · high confidence
Test coverage
Updated test dependencies for repository tests
The test suite for the base repository was updated to use IPublisher instead of IMediator, ensuring the tests align with the current event-sourcing infrastructure.
tests · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 46 → 45 (-1.2)
- Rubric changed (rubric-2026.08.18 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 87 → 87 (+0.0)
- Architecture 84 → 84 (+0.0)
- Maturity 60 → 60 (+0.0)
- Readiness 34 → 33 (-0.1)
- Security 40 → 39 (-1.0)
- Domain Modelling 77 → 60 (-16.6)
- Event-Driven 100 → 100 (+0.0)
- Event Sourcing 100 (new)
Resolved (9)
- Bounded contexts not declared
- No exposed public API
- The README describes a Banking example with Customers and Accounts Bounded Contexts but never explains how to create an Account write model or run migrations, which are core event-sourcing features the document claims to cover. (README.md)
- Typo in property name: 'TransationDate' is a misspelling of 'TransactionDate'. This is inconsistent with the correct spelling used elsewhere (e.g., in the anonymous type parameter list in the same codebase).
- early-stage repository — too little history to judge knowledge freshness
- git history depth insufficient
- git history depth insufficient
- redundant comment (src/AspNetCore.EventSourcing.Core/Abstractions/Entities/EventSourcedAggregate.cs)
- single-maintainer — knowledge-concentration (bus factor) risk
New (14)
- Documentation: no contributor guidance (README.md)
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
- End-of-life runtime: .NET net7.0
- Inconsistent naming for persistence operations: 'AppendEventsAsync' is used for writing events, while 'SaveAsync' is used for saving aggregates. Additionally, 'ReadEventsAsync' is used for reading, but 'GetById' is used elsewhere for retrieval. The verb 'Append' is specific to Event Store semantics, whereas 'Save' is generic. While 'Append' is technically precise for an Event Store, the coexistence of 'Append' and 'Save' for write operations, and 'Read' vs 'Get' for read operations, creates a slight vocabulary drift between the EventStore implementation and the generic Repository pattern.
- Medium IaC: WD-COMPOSE-0002 (docker-compose.yml)
- Medium IaC: WD-DOCKER-0003 (src/AspNetCore.EventSourcing.Api/Dockerfile)
- Medium IaC: WD-DOCKER-0003 (src/AspNetCore.EventSourcing.Api/Dockerfile)
- Medium IaC: WD-DOCKER-0003 (src/AspNetCore.EventSourcing.Migrations/Dockerfile)
- Medium IaC: WD-DOCKER-0003 (src/AspNetCore.EventSourcing.Migrations/Dockerfile)
- Medium IaC: WD-K8S-0004 (charts/api/templates/api-deployment.yaml)
- Medium IaC: WD-K8S-0004 (charts/api/templates/database-migration-job.yaml)
- Typo in property name 'TransationDate' (missing 'n'). This is a spelling error, not just a style inconsistency.
- redundant comment (src/AspNetCore.EventSourcing.Application/AutofacModules/ApplicationModule.cs)
API surface
- Unchanged — 12 HTTP endpoints
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
matt-bentley/AspNetCore.EventSourcing was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 21 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit f309270930e806b586cc1739f10ea8cdafb24b12 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-28e75b8e3254.