How to move controllers that are not in an area to an area?

I started programming with MVC3 without any domain knowledge. As the application grows, I would like to use areas to organize my code, but most of my controllers are not in any areas.

How to quickly move an existing controller to an area?

+3
source share
1 answer

Create a scope, move the controller class file to the folder of Controllersthat scope, and then change the namespace of the controller to match Area. Then move your views to the area Views.

But keep in mind that you need to update all links to this controller by specifying the name of the area in the URL.

+5

All Articles