I'm trying to understand where does InputModel and ViewModels fit at the 4 Layer Architecture.
Presentation | Application | Domain | Infrastructure
Given that the Application Layer takes care about exchange data beteween Presentation Layer and Domain Layer, I supposed that, they must live inside this layer, as well the adapter to convert It back to Domain Entity and vice versa.
InputModels, also know as Commands, in ASP.NET MVC they can coincide with ViewModels.
Makes no sense to me ViewModels inside the Presentation. From the Application Layer I should return ViewModels to the Presentation and receive ViewModels to Mapp It back to Domain Entity. If I have ViewModels inside the Presentation, and the presentations refers to Application Layer, I will have a loop reference.
And also, for example, If I have a Presentation build into ASP.NET MVC and I have the necessity to change It for Windows Application I will lost this ViewModels that fit on my requisites, what is a shame, given that I already have everything built in to change the presentation Technology.
I'm reading the book From Dino Esposito and Andrea Saltarello, Microsoft .NET: Architecting for the Enterprise. They don't talk too much about the Application Layer, only say that, this one should Orchestrate Domain Services and Repositories to fullfill User Cases, and to hide Domain from the Presentation.
Is this right? Should I put this DTOs inside the Application Layer? If not, Where does they fit on the Lasangna?