Code generation: Custom controller templates

后端 未结 1 1802
一向
一向 2021-01-04 21:47

To start off, I\'m using Asp.Net MVC 4, and I\'ve modified my solution to contain the CodeTemplates folder by following this tutorial. (I think my issue might be MVC related

相关标签:
1条回答
  • 2021-01-04 22:17

    As far as my understanding of your problem goes, you cannot manage two controllers within one .ps1 file, which corresponds to your "AddController" directory. You have to use the Package Manager and issue a command like

    Scaffold CustomScaffolder <choose-name>
    

    This will generate another subfolder below CodeTemplates with the name . From there, you open and edit t4 files like you did with your existing one.

    More info here

    0 讨论(0)
提交回复
热议问题