wmeints/efcore-ddd-demo
71.0
Strong · 20 September 2026
286
lines of production code
C#
primary language
4
measurements over time
What this system is
This system is a .NET 6 application designed to manage a bakery domain, specifically focusing on the creation and categorization of pies. It enforces strict business rules for pie ingredients, requiring them to sum to a specific ratio, and tracks serving portion constraints. The architecture separates domain logic from infrastructure, using Entity Framework Core to persist data about pies, their ingredients, and their categories.
Features
Introduce Category and Pie domain aggregates with validation rules
The domain layer now includes the Category aggregate and the Pie aggregate. The Category class provides a simple entity with an ID and name. The Pie aggregate introduces a factory method for creation and an UpdateIngredients method that enforces business rules: ingredients must be provided, and their relative amounts must sum to exactly 1.0. The Pie also exposes a read-only collection of ingredients and links to a Category via CategoryId.
src/Domain · high confidence
Behavioural changes
Database schema extended with Categories and Portions support
The data layer now supports categorizing pies and tracking serving portions. A new Category entity has been introduced, requiring a CategoryId foreign key on the Pies table to link pies to their respective categories. Additionally, the Pies table now includes Minimum and Maximum integer columns to define portion ranges, and the database model has been updated with corresponding migrations and entity configurations to persist these new fields.
src/Infrastructure · high confidence
Refined Pie aggregate with dedicated Ingredient and Portions value objects
The Pie aggregate has been restructured to better model baking specifics. The original Pie entity, which only tracked name and description, has been replaced by a more detailed model that includes Ingredient records (capturing name, allergen status, and relative amount) and Portions records (defining minimum and maximum serving sizes). This change allows users to define precise ingredient compositions and serving constraints for pies, moving beyond simple textual descriptions to structured, validated data.
Domain · high confidence
Repository restructured with new layout and licensing
The project has been reorganized into a standard src and tests folder structure, moving Bakery.Api, Bakery.Domain, and Bakery.Infrastructure under src, and their corresponding test projects under tests. An MIT License file has been added, and the README has been updated to reflect the new .NET 6 target and provide instructions for running the included unit tests.
(repo-wide) · high confidence
Test coverage
Added unit and integration tests for Pie domain and repository
Added new test files covering the PieAggregate domain entities (Ingredient, Pie, Portions) and the Infrastructure layer's PieRepository. The domain tests verify validation logic for ingredient names, relative amounts, and portion constraints, as well as pie creation and ingredient updates. The infrastructure tests use an in-memory EF Core database to verify repository operations including saving, finding all, and finding by ID.
tests · high confidence
Dependencies
Upgrade to .NET 6 and update Entity Framework Core dependencies
The project has been upgraded from .NET 5 to .NET 6 across the Domain, Infrastructure, and API projects. Additionally, the Microsoft.EntityFrameworkCore.SqlServer and Microsoft.EntityFrameworkCore.Design packages have been updated from version 5.0.2 to 6.0.7 to align with the new framework version. The API project no longer references these Entity Framework Core packages directly, as they are now managed by the Infrastructure project.
(dependencies) · 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 70 → 71 (+0.5)
- Rubric changed (rubric-2026.08.18 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 77 → 77 (+0.0)
- Architecture 82 → 82 (+0.0)
- Maturity 90 → 90 (+0.0)
- Readiness 80 → 89 (+9.2)
- Security 59 → 58 (-0.7)
- Domain Modelling 100 → 100 (+0.0)
Resolved (9)
- No exposed public API
- There is no guidance on how to modify the demo for a different domain or add new features. (README.md)
- early-stage repository — too little history to judge knowledge freshness
- git history depth insufficient
- git history depth insufficient
- misleading comment (src/Domain/Aggregates/PieAggregate/Portions.cs)
- misleading comment (src/Infrastructure/Data/PieEntityTypeConfiguration.cs)
- redundant comment (src/Infrastructure/Data/PieEntityTypeConfiguration.cs)
- single-maintainer — knowledge-concentration (bus factor) risk
New (6)
- Documentation: no installation or build instructions (README.md)
- Documentation: no licence statement (README.md)
- Documentation: no usage examples (README.md)
- End-of-life runtime: .NET net6.0
- Low coverage: src/Domain/Aggregates/CategoryAggregate/Category.cs (src/Domain/Aggregates/CategoryAggregate/Category.cs)
- No test project references Bakery.Api (src/Api/Bakery.Api.csproj)
Architecture
- Unchanged — 2 containers · 1 contexts · 0 edges
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
wmeints/efcore-ddd-demo 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 20 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 18ea8b1ecf42102ac20788f6be210f536695246e — 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.