Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where should a ViewModel sit in the directory structure of an ASP.NET MVC application

Tags:

asp.net-mvc

I am about to create a ViewModel to pass some data to a View. So if the application structure is convention based. Where are the ViewModel definitions to be kept. I could create a new directory called ViewModels, but what is the RIGHT way.

like image 322
Peter Marshall Avatar asked Feb 28 '23 03:02

Peter Marshall


1 Answers

I don't think there's a widely accepted convention for this.

I have 'ViewModels' folder too.

like image 52
Arnis Lapsa Avatar answered May 01 '23 09:05

Arnis Lapsa