Best practice for repository patten

Posted 1 year ago by tiagomatosweb

Hi all, Quick question in term of best practice, lets say I have: UserController UserService UserRepository


ProductController ProductService ProductRepository

If I want to access any ProductRepository method from UserService should I inject ProductService and then by hierarchy it would access ProductRepository or should I inject ProductRepository straight?


Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.