TDD & DDD from the Ground Up
summary
A .NET web API is built from scratch with xUnit tests, Entity Framework persistence and a public Git history (https://github.com/chrissimon-au/tdd-ddd-demo-dotnet). Tests drive tiny increments—TDD micro-steps—to add students, rooms, courses and enrollments; a capacity rule (room of 3, enrolling a 4th student) exposes a concurrency bug caused by Entity Framework lazy loading. Rather than force an aggregate, the design shifts: enrollments remain open and a separate scheduler algorithm assigns courses to rooms; tests confirm the refactor works.
AI-written summary · about
chapters (12)
- 0:00Introduction and setup
- 2:42Starting TDD with micro tests
- 10:03Building student registration
- 18:46Adding persistence and async
- 23:19Refactoring and vertical slices
- 27:50Linking courses to rooms
- 33:44Enrolling students in courses
- 40:46Concurrency and aggregates
- 47:05Removing unnecessary rules
- 50:18Scheduling courses and rooms
- 56:39Connecting scheduler to API
- 59:48Lightweight DDD and conclusion
