New T4 controller template in MVC3

As you know, to create new t4 templates in MVC you need to add a CodeTemplatesfolder to the project. There are two main subfolders: 1- AddController, 2- AddViewI always use the folder AddViewto add new templates to create custom views, I know that I need a new template to generate controllers, but when I add a new file ttto the folder AddControllerthere is no new option in the templates of the new controller, There are always 3 options:

enter image description here

So, how can I add a new option to the Add Controller window to use my custom controller template? Or if I'm wrong, what is your suggestion to use a template to create controllers?

+5
source share
1

, Add Controller MvcScaffolding nuget:

asp.net:

ASP.NET MVC 3 Visual Studio , :

  • Controller Dialog Create, Read, Update Delete . EF -.
  • Controller Dialog NuGet, MvcScaffolding. , , NHibernate JET ODBCDirect, !

MvcScaffolding .

+4

All Articles