[英]How to access EF objects using the TT templates
I have the myModel.edmx with one table. 我有一张桌子的myModel.edmx。 I am used to work with the auto-generated entities.
我习惯于使用自动生成的实体。 Now I am trying the new TT option, but I can't understand where are the objects?
现在,我正在尝试新的TT选项,但无法理解对象在哪里?
I want to execute a query, but cant find object_name
我想执行查询,但是找不到
object_name
db.ExecuteQuery<object_name >
TT files are not accessing EF objects, but reading the xmlfile(edmx), the is used to create the objects we'll use to get and set data to database. TT文件不访问EF对象,而是读取xmlfile(edmx),用于创建对象,我们将使用这些对象来获取数据并将其设置为数据库。
TT Files on this case are used to generate automatically objects. 在这种情况下,TT文件用于自动生成对象。
For your question you have to take a better look to the xmlformat of edmx file to help you understand, how objects are generated and how to call explicitelly that function 对于您的问题,您必须更好地了解edmx文件的xmlformat,以帮助您了解如何生成对象以及如何显式调用该函数。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.