Should you use the Repository Pattern? With CQRS, Yes and No!
source link: https://www.youtube.com/watch?v=01lygxvbao4
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Should you use the Repository Pattern? With CQRS, Yes and No!
The repository pattern is polarizing. Some developers swear you should always use it to abstract data access logic while others think it's unnecessary if you're using an ORM. So should you use it? My answer is Yes and No! If you're applying CQRS and Vertical Slice Architecture you'll likely want a repository to build up Aggregates. However, for a Query, you may want to just get the data you need rather than an entire aggregate (or collection of aggregates) to build a view model.
🔗 EventStoreDB https://eventsto.re/codeopinion
🔔 Subscribe: https://www.youtube.com/channel/UC3RK...
💥 Join this channel to get access to source code & demos! https://www.youtube.com/channel/UC3RK...
🔥 Don't have the JOIN button? Support me on Patreon! https://www.patreon.com/codeopinion
📝 Blog: https://codeopinion.com 👋 Twitter: https://twitter.com/codeopinion ✨ LinkedIn: https://www.linkedin.com/in/dcomartin/
0:00 Intro 0:56 CQRS & Vertical Slices 4:23 Query 7:16 Command
Show lessShow more
45 Comments
I wish .NET engineers thought more like this. Implementing things based on need instead of matching patterns and what not .
Can you make a video on vertical slice architecture and how to handle cross cutting concerns between features for that architecture?
Read more 3 weeks ago
Read more 3 weeks ago
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK