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

Controller endpoint expects a ViewModel class as parameter (input) #257

Open
RodrigoBernardino opened this issue May 3, 2021 · 0 comments

Comments

@RodrigoBernardino
Copy link

Hello,

I have a question related to cases when a controller endpoint expects a ViewModel as a parameter instead of many primitive parameters. For example, when you have a CRUD page that creates an entity with 6 properties. It will be better to create an endpoint that accepts a ViewModel class that contains these 6 properties than an endpoint that expects 6 parameters.

How this data will be passed to the use case since the Application Layer doesn't have reference to the ViewModels classes? How this transformation between ViewModel and Entity can be made?

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