更新向导(实体框架)- VSS 2008 未更新视图。我应该手动更新吗?
我正在使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论