Should you use the Repository Pattern? With CQRS, Yes and No!

CodeOpinion
CodeOpinion
47.4 هزار بار بازدید - 3 سال پیش - The repository pattern is polarizing.
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.seevid.ir/fa/result?ytch=UC3RKA4vunFAfrfxiJhPEplw 💥 Join this channel to get access to source code & demos! 🔥 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/ https://www.seevid.ir/fa/w/01lygxvbao4 Intro https://www.seevid.ir/fa/w/01lygxvbao4 CQRS & Vertical Slices https://www.seevid.ir/fa/w/01lygxvbao4 Query https://www.seevid.ir/fa/w/01lygxvbao4 Command #softwarearchitecture #domaindrivendesign #cqrs
3 سال پیش در تاریخ 1400/08/05 منتشر شده است.
47,408 بـار بازدید شده
... بیشتر