Can't get dotConnect working with EntityFramework
Posted: Tue 25 Nov 2014 20:51
I am currently evaluating using the DevArt dotConnect for Oracle provider to replace using the Oracle ODP.Net Data Provider for a series of applications.
I am using the latest version of Entity Framework (6.1.1) along with the latest trial version of DevArt dotConnect for Oracle (version 8.4.293). I am using code-first fluent mapping on an already existing database. Whenever I get to the point in my code where I am calling a query, I get the following error message:
An exception of type 'System.IO.FileLoadException' occurred in mscorlib.dll but was not handled in user code
Additional information: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
My application is an ASP.Net Web API with the following information in the web.config file:
My database connection string is as follows (of course with actual credentials and server name stripped out):
I am completely at a loss for why this isn't working. I was really hoping that this provider would alleviate a lot of the headaches that we've been having with the ODP.Net providers and Entity Framework. Does anyone have an idea of what the issue could be?
Thanks.
I am using the latest version of Entity Framework (6.1.1) along with the latest trial version of DevArt dotConnect for Oracle (version 8.4.293). I am using code-first fluent mapping on an already existing database. Whenever I get to the point in my code where I am calling a query, I get the following error message:
An exception of type 'System.IO.FileLoadException' occurred in mscorlib.dll but was not handled in user code
Additional information: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
My application is an ASP.Net Web API with the following information in the web.config file:
Code: Select all
<entityFramework>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
<provider invariantName="Devart.Data.Oracle" type="Devart.Data.Oracle.Entity.OracleEntityProviderServices, Devart.Data.Oracle.Entity, Version=8.4.293.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.4.293.0 Culture=neutral, PublicKeyToken=09af7300eec23701" />
</DbProviderFactories>
</system.data>
Code: Select all
<add name="DataContext" connectionString="User ID=*******;Password=*******;Host=*****;Port=******;Pooling=true;Min Pool Size=1;Max Pool Size=10;" providerName="Devart.Data.Oracle" />
Thanks.