Search found 2 matches

by soko
Wed 27 Jul 2022 04:40
Forum: Entity Framework support
Topic: Getting synchronous behavior from ToListAsync
Replies: 3
Views: 10060

Re: Getting synchronous behavior from ToListAsync

Hello,

7 years (!!) later and this is still not fixed? Am I right? Any news on this?

Soko
by soko
Thu 10 Mar 2022 09:46
Forum: dotConnect for Oracle
Topic: How to ugrade from v9.7.770.0 to v9.16.1434.0
Replies: 1
Views: 1933

How to ugrade from v9.7.770.0 to v9.16.1434.0

Hello,

I've got the task to upgrade our Oracle in our big .NET/WPF application (100 projects).

Some of the projects/libraries are .NET Standard v2.0 and some are .NET Framwork v4.8 with Entity Framework v6.2.0.

In the past we just installed the new version of the setup, swapped the DLLs for the new ones and changed the version-numbers in our source. This worked so far...

And frankly... thats all I know about using DotConnect For Oracle. The original installation and integration in our application was done by a different developer who is not available anymore.
I've read the docs and looked at some example code... but couldn't find any info and the examples are 15 years old...

Anyhow... Now (with NuGet etc.) I'm running into big troubles here...

WORKING (OLD) VERSION:
As an example one project (out of 6 in total) uses the v9.7 DLLs like this in the csproj file:

Code: Select all

<Reference Include="Devart.Data, Version=5.0.2194.0, Culture=neutral, PublicKeyToken=09af7300eec23701, processorArchitecture=MSIL">
  <HintPath>..\..\Bin\Libraries\Devart.Data.dll</HintPath>
<Reference Include="Devart.Data.Oracle, Version=9.7.770.0, Culture=neutral, PublicKeyToken=09af7300eec23701, processorArchitecture=MSIL">
   <HintPath>..\..\Bin\Libraries\Devart.Data.Oracle.dll</HintPath>
<Reference Include="Devart.Data.Oracle.Entity.EF6, Version=9.7.770.0, Culture=neutral, PublicKeyToken=09af7300eec23701, processorArchitecture=MSIL">
   <HintPath>..\..\Bin\Libraries\Devart.Data.Oracle.Entity.EF6.dll</HintPath>
<Reference Include="Devart.Data.Oracle.Entity.Spatials.EF6, Version=9.7.770.0, Culture=neutral, processorArchitecture=MSIL">
   <HintPath>..\..\Bin\Libraries\Devart.Data.Oracle.Entity.Spatials.EF6.dll</HintPath>
In the app.config we use it like this:

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" />
  <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --></configSections>
  <connectionStrings>
    <add name="TiConDbContext" connectionString="metadata=res://*/TiConModel.csdl|res://*/TiConModel.ssdl|res://*/TiConModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=DS3;initial catalog=ticon;persist security info=True;user id=sa;password=Manager2008;multipleactiveresultsets=True;application name=EntityFramework&quot;" providerName="System.Data.EntityClient" />
  </connectionStrings>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
  </startup>
  <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
      <parameters>
        <parameter value="v11.0" />
      </parameters>
    </defaultConnectionFactory>
    <providers>
      <provider invariantName="Devart.Data.Oracle" type="Devart.Data.Oracle.Entity.OracleEntityProviderServices, Devart.Data.Oracle.Entity.EF6, Version=9.7.770.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
    </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=9.7.770.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
	</DbProviderFactories>
   </system.data>
</configuration>
Then we have a licenses.licx in the Properties of each project (dont know what this is for!). The content is:

Code: Select all

Devart.Data.Oracle.OracleConnection, Devart.Data.Oracle, Version=9.7.770.0, Culture=neutral, PublicKeyToken=09af7300eec23701
As mentioned above: The usual upgrade project for us (i.e. when we upgraded 9.5 to 9.7) was to install the new DotConnetForOracle, swap to the new DLLs and change the version numbers in all files above... and it worked.

FAILING (NEW) VERSION:
Now I've downloaded and installed the newest (dcoracle916pro.exe) installer, used NuGet and installed this to packages to the projects (csproj):

Code: Select all

		<PackageReference Include="Devart.Data" Version="5.0.2858" />
		<PackageReference Include="Devart.Data.Oracle" Version="9.16.1434" />
app.config:

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" />
  <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --></configSections>
  <connectionStrings>
    <add name="TiConDbContext" connectionString="metadata=res://*/TiConModel.csdl|res://*/TiConModel.ssdl|res://*/TiConModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=DS3;initial catalog=ticon;persist security info=True;user id=sa;password=Manager2008;multipleactiveresultsets=True;application name=EntityFramework&quot;" providerName="System.Data.EntityClient" />
  </connectionStrings>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
  </startup>
  <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
      <parameters>
        <parameter value="v11.0" />
      </parameters>
    </defaultConnectionFactory>
    <providers>
        <provider invariantName="Devart.Data.Oracle" type="Devart.Data.Oracle.Entity.OracleEntityProviderServices, Devart.Data.Oracle.Entity.EF6, Version=9.16.1434.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
        <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
    </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=9.16.1434.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
        </DbProviderFactories>
    </system.data>
</configuration>
licenses.licx:

Code: Select all

Devart.Data.Oracle.OracleConnection, Devart.Data.Oracle, Version=9.16.1434.0, Culture=neutral, PublicKeyToken=09af7300eec23701
But when I start our application - even with no oracle connection - I get the following exception:

Code: Select all

System.InvalidOperationException: The Entity Framework provider type
'Devart.Data.Oracle.Entity.OracleEntityProviderServices, Devart.Data.Oracle.Entity.EF6, Version=9.16.1434.0, 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.
Then I thought... OK... kinda obvious... I'm still missing
- Devart.Data.Oracle.Entity.EF6.dll
- Devart.Data.Oracle.Entity.Spatials.EF6.dll

Devart.Data.Oracle.Entity.Spatials.EF6.dll: This one I could not even find anymore anywhere. Is this included now in another package?

Devart.Data.Oracle.Entity.EF6.dll:
For this I've found the NuGet Package Devart.Data.Oracle.EF6... but it does not support .NET Standard v2.0! It also requires EF v6.4.4, which should be no problem to upgrade on our side.
But we cannot change to .NET v2.0. In addition we still need it in some .NET Framework v4.8 projects as well (which we cannot change either).

QUESTIONS
Is there even a way to get v9.16 running on a mixed .NETStandardv2.0/.NETFrameworkv4.8 application?
If no (which whould be my educated guess ;) ): Which one is the last version this would work and I find all 4 needed DLLs:
- Devart.Data.dll
- Devart.Data.Oracle.dll
- Devart.Data.Oracle.Entity.EF6.dll
- Devart.Data.Oracle.Entity.Spatials.EF6.dll

Thanks heaps!
Soko