你的位置: 码友网首页 / 资讯源列表 / Should you use the Repository Pattern? With CQRS, Yes and No!

关于[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.

原文地址: https://codeopinion.com/should-you-use-the-repository-pattern-with-cqrs-yes-and-no/

收录时间: 2021-12-03 浏览量: 89 分类: 架构设计

| 0 收藏 | 0