Skip to content

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

@RodrigoBernardino

Description

@RodrigoBernardino

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions