Updated on Kisan Patel
In Previous Article I told you About how to create a new MVC Project in Visual studio. Here is the link
Now How to add new controller in MVC
so
after creating a new project or in your project goto your Solution Explorer then Goto Controller folder and right click on controller folder -> add -> controller.
Then Select Your controller type in Add scaffold then click on Add.
there are many type of controller which creates controller about their types
1) MVC Controller – Empty
2) MVC controller with read/Write Actions
3) MVC Controller with views, using Entity framework
1) MVC Controller – Empty
MVC Controller – Empty is a controller which creates just controller with one single view index. but it will not create any scaffold in view folder.
2) MVC controller with read/Write Actions
MVC controller with read/Write Actions will add the Create, Details, Edit, Delete and List view in controller with entity framework . but it will not create any scaffold in view folder.
3) MVC Controller with views, using Entity framework
MVC Controller with views, using Entity framework will create View pages with given model and context . it will create Create, Details, Edit, Delete and List page with scaffold in view folder