Рет қаралды 39,191
☄️ Master the Modular Monolith Architecture: bit.ly/3SXlzSt
📌 Accelerate your Clean Architecture skills: bit.ly/3PupkOJ
🚀 Support me on Patreon to access the source code: / milanjovanovic
The generic repository pattern is precisely that - a repository pattern implementation that is generic. You don't benefit from implementing it on top of EF Core. But you do introduce a useless abstraction over EF Core. Specific repositories are a different story, and they're common in DDD. I'll explain in the video how to implement and use the generic repository pattern and why I think it's an anti-pattern.
Join my weekly .NET newsletter:
www.milanjovanovic.tech
Read my Blog here:
www.milanjovanovic.tech/blog
Subscribe for more:
/ @milanjovanovictech
Chapters
0:00 Defining the generic IRepository interface
2:33 Implementing the generic Repository with EF Core
5:00 Configuring generic Repository with DI
5:43 How to use the generic repository pattern
8:34 What I think about generic repositories