How I Use The Generic Repository Pattern In Clean Architecture

Milan Jovanović

β˜„οΈ Master the Modular Monolith Architecture:
πŸ“Œ Accelerate your Clean Architecture skills:
πŸš€ Support me on Patreon to access the source code:

The generic repository pattern is precisely that – a repository pattern implementation that is generic. You won’t benefit much from implementing it on top of EF Core.

Specific repositories are a different story, and they’re common in DDD. I’ll explain in the video how I use the specific repository pattern and use the generic repository pattern to reduce code duplication.

Join my weekly .NET newsletter:

Read my Blog here:

Subscribe for more:

0:00 Specific repository in the Domain layer
1:26 Using the repositories in use cases
3:25 Why I like Specific repositories with Clean Architecture
5:13 Specific repository downsides
6:06 Creating a generic repository with EF Core
8:40 Refactoring to use the generic repository
11:04 Strongly typed IDs with generic repository
15:45 Solving breaking changes with Extract Interface refactoring