更新向导(实体框架)- VSS 2008 未更新视图。我应该手动更新吗?

发布于 2024-09-07 15:48:47 字数 388 浏览 1 评论 0原文

我正在使用 VSS 2008 并从 SQL Server 2008 数据库构建实体框架模型。一切都很好。现在我已经更新了一个视图以包含一个新列,并尝试从数据库刷新整个模型,但视图中更新的列不可见。

我打开 EDMX 作为 XML 来查看问题,它有一个警告...... 生成过程中发现的错误: 警告 6002:表/视图“Internet.dbo.XYZ”没有定义主键。已推断出键,并将定义创建为只读表/视图。

我的问题是,如何强制将此视图中的新列添加到我的模型中。我可以手动更新 EDMX 以将此列作为属性包含到视图实体中吗?然而,这可能是一项乏味的任务,并且可能无法保证能够解决问题。我应该删除这个视图然后重新添加它,但我读到某人的帖子,当他尝试重新添加该对象时,它不允许他?

谢谢。

I am using VSS 2008 and built a Entity Framework model from SQL server 2008 database. Everything worked fine. Now I have updated a view to include a new column and tried refreshing the entire model from DB but the updated column in the view is not visible.

I opened the EDMX as XML to see the problem and it has a warning ...
Errors Found During Generation:
warning 6002: The table/view 'Internet.dbo.XYZ' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.

My question is, how do I FORCE the new column from this view to be added to my model. Can I update the EDMX manually to include this column as a property to the view entity. However, this could be a tedious task and is probably not guaranteed as a fix. Should I delete this view and then re-add it, but I read someones post that when he tried to re-add the object, it didn't allow him?

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文