Where should I store class files in an ASP.NET MVC project?

I am just starting to work with MVC and trying to understand the best practices of application development. In the world of WebForms, I usually just created the Classes folder, where I saved all my * .cs files. However, due to the way MVC uses the folder structure to create different namespaces, I'm not sure if everything is correct. I can't seem to find any guidance from Microsoft on this topic, so I hope someone can help me in the right direction.

Is there a way to organize files in an MVC application? And, more generally, is there an authoritative place to look for such guidance on best practice?

+5
source share
3 answers

MVC , . , , . , Controllers. ViewModel, ViewModel.

, , , , , -. , , Plain Old CLR (POCOs) . , webforms.

ORM , , LINQ Entity Framework, , .DBML(LINQ) .EDMX(Entity Framework) "". "".

, .

+2

:

  • ViewModels
  • Mappers
  • ...

, .

MVC-. .

+4

​​Mvc Views ( Areas, ), . . , , , , , , .

( ), .

0

All Articles