如何添加表实体框架? [英] How to add table in Entity Framework?

查看:92
本文介绍了如何添加表实体框架?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个项目,我在Asp.net与实体框架的。

I have a project that I made in Asp.net with Entity Framework.

现在我要添加在数据库中的一个或多个表和一个或多个存储的过程。
但是,实体不显示了新表。

Now I want to add one or more tables in the database and one or more stored procedures. But entities not shows the new table.

如何显示呢?

推荐答案

打开emdx文件,就在模式的任意位置单击,选择从数据库更新模式,并按照指示,然后选择所需的表和SP。

Open emdx file, right click anywhere in the modal and select "Update Model from Database" and follow the instructions and choose the desired tables and SPs.

有时甚至执行这些步骤后,你的模型没有得到更新,如此接近VS并重新启动它。这种情况很多时间陪我。

Sometime even after following these steps, your model did not get updated, so close VS and restart it again. This happens many time with me.

这篇关于如何添加表实体框架?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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