简体   繁体   English

是否可以创建将由T4模板使用的表格

[英]is it possible to create a Form that will be used by a T4 template

I was wondering if it is possible to create a form that will be run on the execution of a t4 template. 我想知道是否可以创建将在执行t4模板时运行的表单。 I would like the values inputted into the form to be used by the template to generate code, similarly to add view in an asp.net mvc project ie right click add view and a form would appear to add a new view. 我希望输入到表单的值可以被模板用来生成代码,类似于在asp.net mvc项目中添加视图,即,右键单击添加视图,然后将出现一个表单以添加新视图。

Also in the add view (example discussed above) would it be possible to edit the form that appears ie add a new text box? 同样在添加视图(上面讨论的示例)中,是否可以编辑显示的表单,即添加新的文本框?

Something similar can be done with MVC Scaffolding. MVC支架可以完成类似的操作。 Only difference is it uses Powershell as the "UI" and environment. 唯一的区别是它使用Powershell作为“ UI”和环境。 Pretty powerful stuff, you can configure it via command line parameters. 非常强大的功能,您可以通过命令行参数进行配置。 Part 5-6-7 contains customization/modification related informations. 第5-6-7部分包含与定制/修改有关的信息。

http://blog.stevensanderson.com/2011/01/13/scaffold-your-aspnet-mvc-3-project-with-the-mvcscaffolding-package/ http://blog.stevensanderson.com/2011/01/13/scaffold-your-aspnet-mvc-3-project-with-the-mvcscaffolding-package/

No dialog boxes, and forms aout of the box, but powershell (and any command line) is pretty useful if you are a developer. 没有对话框,没有现成的形式,但是如果您是开发人员,powershell(和任何命令行)将非常有用。 You can queue up tasks, etc... 您可以将任务排队等等。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM