[英]Location of EntityFramework T4 templates
当您在EntityFramework中进行数据库优先或模型优先(EDMX)时,我相信Visual Studio会从T4模板生成代码,我想创建一个默认值之外的新代码并在其中进行一些自定义,但是我找不到它们的位置任何地方。
Expand the .edmx file in the VS Solution explorer to access and edit directly. 在VS解决方案资源管理器中展开.edmx文件,以直接访问和编辑。 To make backup copies, when browsing with windows explorer you should find them in the same project folder or other folder you placed your .edmx file in.
若要制作备份副本,在使用Windows资源管理器浏览时,应在与您的.edmx文件相同的项目文件夹或其他文件夹中找到它们。
Visual Studio 2010, do not use T4 to generate the model's codebehind, it uses the EntityModelCodeGenerator
tool. 在Visual Studio 2010中,不要使用T4生成模型的代码,而是使用
EntityModelCodeGenerator
工具。
Since EntityModelCodeGenerator
tool cannot be modified, Microsoft provided the ability to create an ADO.NET EntityObject Generator
which will generate a T4 base template which is equivalent to what the EntityModelCodeGenerator
generates. 由于
EntityModelCodeGenerator
工具无法修改,因此Microsoft提供了创建ADO.NET EntityObject Generator
的能力,该生成ADO.NET EntityObject Generator
将生成T4基本模板,该模板与EntityModelCodeGenerator
生成的模板相同。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.