VS 2010 EDMX存储过程丢失 [英] VS 2010 EDMX Stored Procedure Missing

查看:111
本文介绍了VS 2010 EDMX存储过程丢失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Visual Studio 2010 SP1,SQL Server 2008:

Using Visual Studio 2010 SP1, SQL server 2008:

主板最近失败了,我把我的所有工作都迁移到了一台新电脑。我的项目使用实体数据模型连接到一个sql数据库。我在迁移之前已经完成了所有的设置和工作,但现在所有的存储过程都从模型浏览器中消失了。函数导入仍然存在,但它们显然不再起作用。

Motherboard recently failed and I migrated all my work to a new computer. My project uses entity data model to connect to a sql database. I had everything set up and working before the migration, but now all of the stored procedures have disappeared from the model browser. The function imports are still there, but they obviously no longer work.

问题是,当我转到从数据库更新模型时,存储过程不显示。大概是因为它们已被添加,更新窗口隐藏了你应该已经拥有的东西。刷新选项卡也不显示,也可以在刷新时执行任何操作。他们仍然存在于服务器上,所以我知道它正在隐藏他们,因为它认为他们已经在那里。

The problem is, when I go to "Update Model from database" the stored procedures do not display. Presumably because they were already added, and the update window hides things that you should already have. The refresh tab doesn't display them either, or do anything when I hit refresh. They still exist on the server, so I know that it is hiding them because it thinks they are already there.

如何删除任何原因VS认为他们已经被添加,所以我可以重新添加,或让他们刷新?我真的不想删除模型并重新开始。

How do I remove whatever causes VS to think they have already been added so I can re-add, or get them to refresh? I really don't want to have to delete the model and start over.

推荐答案

如果没有看到函数存储过程在模型浏览器中打开EDMX作为XML,并检查由<! - SSDL内容 - > 包含和函数元素 - 这是你的存储过程。然后检查由<! - CSDL内容引入的部分 - > 包含任何 FunctionImport 元素 - 您的函数导入,最后一次检查由<! - CS映射内容 - > 引入的部分包含andy FunctionImportMapping 元素 - 这是过程和函数导入之间的映射。您缺少的每个存储过程在每个部分应该只有一个记录。如果没有备份您的EDMX并删除存储过程的剩余记录。然后检查它是否出现在向导中。

If you don't see function stored procedures in the model browser open EDMX as XML and check if part introduced by <!-- SSDL content --> contains and Function elements - that are your stored procedures. Then check that part introduced by <!-- CSDL content --> contains any FunctionImport elements - that are your function imports and for last check that part introduced by <!-- C-S mapping content --> contains andy FunctionImportMapping elements - that are mappings between procedures and function imports. Each stored procedure you are missing should have exactly one record in each section. If it doesn't have backup your EDMX and remove remaining records for the stored procedure. Then check if it appears in the wizard.

这篇关于VS 2010 EDMX存储过程丢失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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