Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Service Layer to Work Directly with Models Instead of DTOs #11

Open
dangquyitt opened this issue Jan 17, 2025 · 0 comments
Open

Comments

@dangquyitt
Copy link

I believe that DTOs should only be used in the controller layer, while services should work directly with models to maintain the independence of business logic. Imagine if your request didn’t come through HTTP but via gRPC or a message queue; you would only need to map it to the corresponding model, and the service code would remain unchanged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant