abp-ddd
Installation
SKILL.md
ABP DDD Patterns
Docs: https://abp.io/docs/latest/framework/architecture/domain-driven-design
Anti-Patterns to Avoid
- Anemic entities: public setters with no behavior — use private setters + methods that enforce invariants
- Repository for child entities: only aggregate roots get repositories — access child entities through their root
- Generating GUID in entity constructor: use
IGuidGeneratorfrom outside and passidparameter - Navigation properties to other aggregates: reference by
Idonly, never add full navigation properties across aggregates - Domain service depending on current user: accept values from the application layer instead
Rich Domain Model vs Anemic Domain Model
ABP promotes Rich Domain Model pattern where entities contain both data AND behavior: