且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

code世代:自定义模板控制器

更新时间:2023-02-12 14:24:19

至于我对你的问题的理解的话,你无法管理一个名为.ps1文件,这相当于你的AddController目录中的两个控制器。
您必须使用程序包管理器,并发出像

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>

这将产生以下codeTemplates另一个子文件夹的名称。从那里,你喜欢你与你现有的那样打开和编辑T4文件。

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.

更多信息here