添加实体框架时,Visual Studio错误6002警告 [英] Visual Studio error 6002 warning when add in entity framework
本文介绍了添加实体框架时,Visual Studio错误6002警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
所以我得到了Entity框架来处理我正在处理的这个oracle数据库。但是,当我创建emdx文件时,一切都很好,但我得到了大约100个警告,其中有很多错误6002表示表/视图没有定义主键。已推断密钥,并且定义是以只读方式创建的。我该怎么解决这个问题?这是否意味着我无法使用此警告插入或修改这些表中的数据?
So I got the Entity framework to work with this oracle database that I am working on. However, when I created the emdx file, everything is fine but I get a tons of about 100 warning, in which there is a lot of error 6002 says the table/view doesnt have primary key defined. Key has been inferred and the definition was created as read-only. How am I going to fix this? And does this mean I cannot insert or modify the data in these tables with this warning?
推荐答案
使用EF时,您应该使用带有主键的表。在导入视图时,视图应使用主键本身。
While using EF you should use tables with a primary key. And while importing views, view should use the Primary key itself.
这篇关于添加实体框架时,Visual Studio错误6002警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文