从EF5升级到EF6时,应该替换System.Data.Objects吗? [英] When upgrading from EF5 to EF6 should I replace System.Data.Objects?
问题描述
我试图用EF6
替换EF5我的很多代码都给出了类型引用错误,
我应该在我的System.Data.Entity.Core.Objects中替换System.Data.Objects吗?
I am trying to replace EF5 with EF6 A lot of my code is giving type reference errors, Should I replace System.Data.Objects with System.Data.Entity.Core.Objects in my references?
[Update]还可以将System.Data.EntityState替换为System.Data.Entity.EntityState吗?
[Update] Also do I replace System.Data.EntityState with System.Data.Entity.EntityState ?
推荐答案
更新指南;
命名空间更改的一般规则是将System.Data。*中的任何类型移动到System.Data.Entity.Core。*。换句话说,只需插入Entity.Core。
The general rule for namespace changes is that any type in System.Data.* is moved to System.Data.Entity.Core.*. In other words, just insert Entity.Core. after System.Data.
换句话说,是的,您应该更新对新名称空间的引用。
In other words, yes, you should update your references to the new namespace.
这篇关于从EF5升级到EF6时,应该替换System.Data.Objects吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!