design patterns - controller/service/repository style, should service wrap repository for other service -


my project followed controller/service/repository style, usercontroller -> userservice -> userrepository , shopcontroller -> shopservice -> shoprepository. want fetch user shopservice, should call userservice or call userrepository directly shopservice.

as per understanding repository should accessed service layers.

expose known interfaces via service layer. changes repository (like underlying orm change or db change) go unknown consumer client.

so answer question - call userservice.


Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -