Last post Mar 06, 2016 05:32 PM by lannie
Mar 01, 2016 10:22 PM|id3ma|LINK
Hello. I am running an oracle 12c pdb. I create a new MVC project using VS 2013 and install EF6. When I use DB first and back into my models using my Oracle pdb, VS tells me that I can't use EF6, only EF5. Very confusing. I've tried to install all the
different Oracle NuGet packages and that only makes things worse. If you install any of the Oracle NuGet packages, it blocks things altogether. I'm stumped. I want to use EF6 but am forced into using EF5 at this point.
Mar 02, 2016 03:21 AM|Candice Zhou|LINK
To add Oracle provider you need to open web.config and add following:
<provider invariantName="Oracle.ManagedDataAccess.Client" type="Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices, Oracle.ManagedDataAccess.EntityFramework, Version=18.104.22.168, Culture=neutral, PublicKeyToken=89b483f429c47342" />
You can check if it's needed in your case.
<section name="Oracle.ManagedDataAccess.Client" type="OracleInternal.Common.ODPMSectionHandler,
Oracle.ManagedDataAccess, Version=22.214.171.124, Culture=neutral, PublicKeyToken=89b483f429c47342" />
For more information about using entity framework 6, database-first with Oracle, you could refer to the below link:
Mar 02, 2016 10:23 PM|id3ma|LINK
Thank you! Hopefully this makes the headaches go away.
Mar 03, 2016 11:08 PM|id3ma|LINK
Well unfortunately it's still not working. Followed every step in the C# today post. Frustrating.
Mar 06, 2016 05:32 PM|Lannie|LINK
Did you install the Oracle Data Access Client 12c R4 32-bit with Visual Studio 2013 Oracle Developer Tools in addition to your Oracle 12c Personal Database?
Required for Entity Framework.
Install in the same ORACLE_BASE directory but in a different ORACLE_HOME directory.
Important: Before you install this package please make sure there is no ODAC/Oracle Universal Installer (OUI) version of Oracle Developer Tools for Visual Studio installed on the machine. If there is then please use OUI to uninstall Oracle Developer
Tools for Visual Studio before proceeding with this install.
This download does not include support for User Defined Types nor Oracle Database Extensions for .NET.
If you require Oracle Data Provider for .NET, Unmanaged Driver then please
download the ODAC/OUI version of Oracle Developer Tools for Visual Studio.