I created repositories for my entities to do CRUD operations.
For example, I have a Departament
entity, so I created a DepartamentRepository
and a DepartamentController
to expose it via rest api.
Now, I have to create a chart in frontend which needs information about Departament
and 6 more entities that will be crossed. The end of task will bring a dto with the calculated information.
My question is: Should I put this query methods and logic in the DepartamentoRepository
even if the data is not only about Departament
entity? If not, should I create a Service to handle it?
Aucun commentaire:
Enregistrer un commentaire