Skip to main content
grasp.study
About
Explore
Pricing
Log in
Try it for free
Back to course
👋
Welcome to a Grasp lesson
Create a free account
to keep studying and create your own study path.
Explore drive-driven development
·
Module 3
Tactical Patterns: Repositories and Persistence
1
Repository Pattern: Abstracting Persistence
Explain the role of the Repository pattern in abstracting persistence logic from the domain model
2
Defining Aggregate Repositories
Define a repository interface in the domain layer, focused on aggregate-level operations (e.g., add, get)
3
In-Memory Repository for Unit Testing
Implement an in-memory repository in the infrastructure layer for unit testing purposes
4
Mapping Aggregate Roots to SQLAlchemy Models
Set up a basic SQLAlchemy model to map an Aggregate Root to a database schema
5
SQLAlchemy Repository for Aggregate Persistence
Implement a SQLAlchemy-based repository that uses a Session to persist and retrieve aggregates
Previous module
Tactical Patterns: Domain Model Building Blocks
Next module
Tactical Patterns: Services, Use Cases, and Transactions