If you try to upgrade your components or applications to EF 6 from older versions, you could observe that compilation fails. It is because
Microsoft broke the backward compatibility by any reason. But its easy to fix it.
First of all, is upgrade by installing Entity Framework desde nuget, this remove older versions of EF and should remove System.Data references too. But in several cases does not do it. In this case you must remove it.
To fix follow below steps:
- Install EF 6 from nuget.
- Remove references to System.Data.Entity.
- Update namespaces of System.Data.Entity to System.Data.Entity.Core
This procedure fix the compilation issues in most cases, but if you continue having problems you should review next page from MSDN.: http://msdn.microsoft.com/en-US/data/upgradeEF6
There are other possible accesibility issues to classes ObjectContext and DbContext.