Page 1 of 1

dotConnect for Oracle 8.1.45 / VS2013 / EF6.0.1 - Cannot connect

Posted: Mon 09 Dec 2013 21:14
by cstahlsmith
I am attempting to create a new EF6 project using the latest dotConnect Express for Oracle (v8.45). I have tried both nuGet package install as well as separate download/install on dotConnect.

If I start a brand-new project and do NOT load EF6 but just dotConnect, it works and I can connect and retrieve an entity with data... great!

But, if I upgrade EF to v6.0.1 from nuGet and target dotConnect for EF6, then I get the following error:

The Entity Framework provider type 'Devart.Data.Oracle.Entity.OracleEntityProviderServices, Devart.Data.Oracle.Entity, Version=8.1.26.6, Culture=neutral, PublicKeyToken=09af7300eec23701' registered in the application config file for the ADO.NET provider with invariant name 'Devart.Data.Oracle' could not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information.

Also, the designer doesn't seem to create the app.config connection string entry after it generates the .edml file(s). I have to manually copy them in.

* ODAC 12 is loaded and connects via VS2013 Server Explorer, no problem
* Targeting framework 4.5.1 (I tried earlier frameworks and it doesn't seem to help)
* Testing a class library and separate unit-test (no ASP, etc in the way)

Any suggestions on what might be wrong?
Thanks

Re: dotConnect for Oracle 8.1.45 / VS2013 / EF6.0.1 - Cannot connect

Posted: Tue 10 Dec 2013 10:40
by Shalex
cstahlsmith wrote:I am attempting to create a new EF6 project using the latest dotConnect Express for Oracle (v8.45).
The Entity Framework feature is available only in the Professional and Developer editions of dotConnect for Oracle: http://www.devart.com/dotconnect/oracle/editions.html.

Re: dotConnect for Oracle 8.1.45 / VS2013 / EF6.0.1 - Cannot connect

Posted: Thu 16 Jan 2014 21:29
by barrycogan
This also occurs on the trial for dotConnect 8.2.80.0.

Does the trial support EntityFramework (specifically version 6)?

In my tests on both console and MVC applications I have only been successful creating ADO.NET Entity Data Models through Entity Framework 5. Version 6 is greyed out and not selectable.

In our production environment we only have EF6 so I need it to behave and it has to be database first as it's a third party database I can not alter.

The application has two connections one to our internal DB (MSSQL) and the 3rd party DB(oracle)

Re: dotConnect for Oracle 8.1.45 / VS2013 / EF6.0.1 - Cannot connect

Posted: Fri 17 Jan 2014 13:12
by Shalex
barrycogan wrote:Does the trial support EntityFramework (specifically version 6)?
Yes, it does. It is supported in dotConnect for Oracle Professional Trial.
barrycogan wrote:In my tests on both console and MVC applications I have only been successful creating ADO.NET Entity Data Models through Entity Framework 5. Version 6 is greyed out and not selectable.
With EDM Designer, you should add registration of EF6-provider manually (http://blog.devart.com/entity-framework ... gistration):

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
  </configSections>
  <entityFramework>
    <providers>
      <provider invariantName="Devart.Data.Oracle" type="Devart.Data.Oracle.Entity.OracleEntityProviderServices, Devart.Data.Oracle.Entity, Version=8.2.80.6, Culture=neutral, PublicKeyToken=09af7300eec23701" />
    </providers>
  </entityFramework>
  <system.data>
    <DbProviderFactories>
      <remove invariant="Devart.Data.Oracle" />
      <add name="dotConnect for Oracle" invariant="Devart.Data.Oracle" description="Devart dotConnect for Oracle"
       type="Devart.Data.Oracle.OracleProviderFactory, Devart.Data.Oracle, Version=8.2.80.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
    </DbProviderFactories>
  </system.data>
</configuration>
Replace 8.2.80 here with your current version of dotConnect for Oracle. Please note that the revision number of provider in the entityFramework section is *.6 but in DbProviderFactories - *.0.

We recommend you to use Entity Developer (Devart Entity Model, *.edml) instead of EDM Designer (ADO.NET Entity Data Model, *.edmx) because it is adjusted for working with Oracle and has an advanced functionality: http://www.devart.com/entitydeveloper/ed-vs-edm.html. Additionally, Entity Developer adds registration of EF6-provider in app.config automatically.
barrycogan wrote:The application has two connections one to our internal DB (MSSQL) and the 3rd party DB(oracle)
An example, which demonstrates a simultaneous use of several EF6-providers, is available at http://blog.devart.com/entity-framework ... ml#Samples.

Re: dotConnect for Oracle 8.1.45 / VS2013 / EF6.0.1 - Cannot connect

Posted: Fri 17 Jan 2014 15:09
by barrycogan
Thank you I will try that out and get back to you! :)