mercredi 26 juillet 2017

controller/service/repository style, should service wrap repository for other service

My project followed a controller/service/repository style, like UserController -> UserService -> UserRepository and ShopController -> ShopService -> ShopRepository. Now I want to fetch user from ShopService, should I call UserService or call UserRepository directly from ShopService.

Aucun commentaire:

Enregistrer un commentaire