首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >“删除未映射的表和视图”对话框的替代选项是什么?

“删除未映射的表和视图”对话框的替代选项是什么?
EN

Stack Overflow用户
提问于 2013-03-07 14:35:46
回答 2查看 313关注 0票数 1

我有一个实体框架模型连接到Server数据库。我想从模型中删除一个表,而不是从数据库中删除一个表。因此,我在模型中的表上按delete键,得到一个对话框:

代码语言:javascript
复制
Delete Unmapped Tables and Views

The following tables and views in the store model will no longer be mapped. Do you want them deleted?

Yes No Cancel

根据msdn

代码语言:javascript
复制
Yes: In addition to the objects in the conceptual model that you selected for deletion, all unmapped objects (shown in the dialog box display) are deleted from the storage model. This includes objects in the storage model that were already unmapped, not just objects that have become unmapped as a result of the deleting the selected conceptual model objects.

No: No objects will be deleted from the storage model. Only the objects in the conceptual model that you selected will be deleted.

Cancel: The operation is canceled. No objects in the conceptual model or storage model will be deleted.

因此,如果我正确理解了这一点,是和否都将从模型中删除该表,而取消将不会?

也不是一个安全的按钮,因为它不会从数据库中删除表或删除其数据?

我正在运行visual 2012、C#、.NET 4.5和Server 2012

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2013-03-08 13:47:58

这就是他们真正的意思:

是-从设计器和sql数据库中删除。

不-从设计者中删除

取消-不删除任何内容

票数 1
EN

Stack Overflow用户

发布于 2020-08-26 16:08:44

被接受的答案一半是正确的。是的不会删除基础sql表。

  • 从图表中删除,但不删除.Store存储模型:

  • 是的-从图表和.Store存储模型中删除。而不是实际的Db表。
  • 在对表结构进行剧烈更改时,我经常这样做,例如更改列名等。选择Yes,然后从DB更新模型,然后重新添加表。
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/15273912

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档