I am trying to implement a layered architecture consisting of; Controller
, Service
, Repository
, Entity
.
Each module has at least some of the above layers.
I am often finding that modules need to share some functionality, for example when creating a BlogPost
I may need information about the Account
, currently I am injecting the services into the controllers, which works fine.
However my question comes from the fact that controllers are becoming like services, they house some logic in terms of what happens when and often they merge data from the response of two services. From my understanding the controller should be more of a pass-through mechanism.
What is the best approach to solve the above issue?