如何更新ADO.net实体数据模型 [英] How to update ADO.net Entity Data model

查看:553
本文介绍了如何更新ADO.net实体数据模型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I have Entity Data model using auto generate from database.

Now, I want to Add another table in Entity Data Model .

I Right Clicked the .edmx file added Update model from Database and selected my table .

everything fine.i see my new Table in Layout Diagram but when i add new Controller with Scaffolding Options i don't find my new table model only i find only old table model . did i miss anything?

Assist me. 







我推荐了这个

http://msdn.microsoft.com/en-us/library/vstudio/cc716697% 28v = vs.100%29.aspx [ ^ ]

推荐答案

假设您的实体数据模型位于第二个项目/程序集中,首先构建该项目,而不是在ASP.NET MVC项目中使用它。
Supposing that your Entity Data Model is in a 2nd project/assembly, you have to build that project first than you can use it in you ASP.NET MVC project.


Hello Sir,



Step1 - 在更新和验证.edmx文件后,您需要构建一次解决方案。

Step2 - 然后您需要展开.edmx文件并寻找T4模板文件,即 .tt 扩展文件。

Step3 - 右键单击它并运行自定义工具。这将使用新添加的实体更新.tt文件,为此创建 .cs 文件。



希望这对Sir先生有所帮助。

谢谢。
Hello Sir,

Step1- You need to build the solution once after Updating and Validating the .edmx file.
Step2- Then you need to expand the .edmx file and look for the T4 template file, i.e. .tt extension file.
Step3- Right click on that and Run Custom Tool. This would update the .tt file with the newly added entity making a .cs file for that.

Hope this helps Sir.
Thanks.


这篇关于如何更新ADO.net实体数据模型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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