T4模板的MVC控制器与实体框架 - 主机的成员属性(MvcTextTemplateHost)? [英] T4 template for an MVC Controller with Entity Framework - member properties of the host (MvcTextTemplateHost)?

查看:226
本文介绍了T4模板的MVC控制器与实体框架 - 主机的成员属性(MvcTextTemplateHost)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人有主机的对象,我可以在T4模板ControllerWithContext.tt自带的MVC 3使用成员的完整参考?

Does anyone have a full reference of the members of the Host object I can use in the T4 template ControllerWithContext.tt that comes with MVC 3?

我已经想尽谷歌搜索我能想到的,但唯一有关的结果是这样的页面:
<一href=\"http://blogs.msdn.com/b/webdevtools/archive/2009/01/29/t4-templates-a-quick-start-guide-for-asp-net-mvc-developers.aspx\" rel=\"nofollow\">http://blogs.msdn.com/b/webdevtools/archive/2009/01/29/t4-templates-a-quick-start-guide-for-asp-net-mvc-developers.aspx

I've tried every google search I could think of, but the only relevant result is this page: http://blogs.msdn.com/b/webdevtools/archive/2009/01/29/t4-templates-a-quick-start-guide-for-asp-net-mvc-developers.aspx

但它只能显示4个属性(ITEMNAME,命名空间ExtraActionMethods,ControllerRootName),而不是完整列表。在模板中有类似的事情RelatedProperties,EntitySetName,ModelType和ContextType。

But it only shows 4 properties(ItemName, NameSpace, ExtraActionMethods, ControllerRootName) and not the full list. In the template there are things like RelatedProperties, EntitySetName, ModelType and ContextType.

我试图找到物业,他们的类型和说明的完整列表。任何帮助将大大AP preciated。

I'm trying to find the full list of properties, their types and descriptions. Any help would be greatly appreciated.

推荐答案

我已经把的 ASP.NET MVC 3个属性可供T4模板当您使用添加视图​​或在Visual Studio 2010中添加控制器对话框它不包括那些属性在包装的NuGet Manager控制台使用MvcScaffolding时可用。使用T4模板,以反映在对MvcTextTemplateHost的公共属性被确定的属性信息。

I have put together an unofficial list of ASP.NET MVC 3 properties available to T4 templates when you use the Add View or Add Controller dialogs in Visual Studio 2010. It does not cover the properties that are available when using MvcScaffolding in the NuGet Package Manager Console. The property information was determined using a T4 template to reflect over the public properties on the MvcTextTemplateHost.

这篇关于T4模板的MVC控制器与实体框架 - 主机的成员属性(MvcTextTemplateHost)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆