Hands-on Experience: What It Means to Design a Domain Model
summary
Argues that a domain model must encode business rules, not just mirror a table, and demonstrates a live water‑polo scoring engine built with immutable value objects, explicit methods and unit tests rather than public setters. Uses .NET idioms (Code Contracts, sealed Score value object, repositories, SignalR for live feed) and shows how a single match class with Entity Framework Code First mapping becomes safer when replaced by behaviorful methods that enforce about 20 business rules; unit tests catch and fix rule violations.
AI-written summary · about
