You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
A repository performs the tasks of an intermediary between the domain model layers and data mapping, acting in a similar way to a set of domain objects in memory. Client objects declaratively build queries and send them to the repositories for answers. Conceptually, a repository encapsulates a set of objects stored in the database and operations that can be performed on them, providing a way that is closer to the persistence layer. Repositories, also, support the purpose of separating, clearly and in one direction, the dependency between the work domain and the data allocation or mapping.
In that aspect if you would notice repositories need stay closer with the infrastructure layer where as query layer should be residing with application where actual data mapping happens.
hi @sughosneo thanks. I got above question when seeing Ordering.API package depends on Dapper (infrastructure) directly. I got it is because closer to the data mapping and uses dto/viewmodel as query's output. So is this an exception when introduce direct dependency to infrastructure in presentation/application layer?
If so, in application layer to call an external web api, should I define the IThirdParyCall in this layer and implement it in infrastructure layer, or just implement in the same application layer? what would you advice? thanks
OrderRepository, implementation of IOrderRepository used by command is located in Infrastructure layer
But OrderQueries , the implementation of OrderQuery used by query shouldn't be in the Infrastructure layer too?
The text was updated successfully, but these errors were encountered: