Page 1 of 1
Oracle.EntityFrameworkCore
Posted: Tue 10 Mar 2020 11:30
by sbauder_sre
Hello,
Will Entity Developer work with
Oracle.EntityFrameworkCore?
I've tried to create a new EF Core Model but the only Provider available is ".Net Framework Data Provider for SqlServer". Note that "Oracle Data Provider for .NET, Managed Driver" is available for a classic EF model.
If it isn't supported...
- Are there plans to support it in the future?
- Are there any configuration "hacks" to get the oracle provider added to the drop down?
- Is there something that I can directly edit in efml to support the provider. (I'm about to explore this option)
TIA
Re: Oracle.EntityFrameworkCore
Posted: Tue 10 Mar 2020 12:52
by sbauder_sre
Quick update...
I've figured out how to get the Oracle provider to appear in the Provider drop down for an EF Core model.
Editing "C:\Program Files (x86)\Common Files\Devart\EntityDeveloper\EntityDeveloper.exe.config" and adding the provider to the end of the EFCore Providers works.
Code: Select all
<EFCore core-assemblies-path="">
<providers>
<!-- ... out of the box providers are here ... -->
<add name="Oracle.ManagedDataAccess.Client" />
</providers>
</EFCore>
Now, I'll just need to customize the template to support Oracle.EntityFrameworkCore.
So, the only question that remains is:
Will Entity Developer be updated to natively support Oracle.EntityFrameworkCore?
Thanks
Re: Oracle.EntityFrameworkCore
Posted: Wed 11 Mar 2020 13:04
by Shalex
You have implemented the correct fix. We will notify you when "C:\Program Files (x86)\Common Files\Devart\EntityDeveloper\EntityDeveloper.exe.config" includes <add name="Oracle.ManagedDataAccess.Client" /> by default.
Re: Oracle.EntityFrameworkCore
Posted: Wed 11 Mar 2020 13:11
by sbauder_sre
Thanks for the reply Shalex.
Are there also plans to update the default EF Core template to support Oracle.EntityFrameworkCore?
I had to manually update the switch statement in GenerateContextConfiguration to handle the provider and call "UseOracle".
Code: Select all
case ProvidersManager.OracleDPManagedInvariantName:
methodName = "UseOracle";
break;
Re: Oracle.EntityFrameworkCore
Posted: Fri 13 Mar 2020 17:29
by Shalex
sbauder_sre wrote: ↑Wed 11 Mar 2020 13:11Are there also plans to update the default EF Core template to support Oracle.EntityFrameworkCore?
I had to manually update the switch statement in GenerateContextConfiguration to handle the provider and call "UseOracle".
Code: Select all
case ProvidersManager.OracleDPManagedInvariantName:
methodName = "UseOracle";
break;
This code has already been added to a predefined EF Core template in Entity Developer v6.6.936.
Re: Oracle.EntityFrameworkCore
Posted: Sat 04 Apr 2020 13:02
by Shalex
"ODP.NET, Managed Driver" is added to the list of available providers in EF Core Model:
viewtopic.php?f=32&t=40473.
Re: Oracle.EntityFrameworkCore
Posted: Fri 10 Apr 2020 14:24
by sbauder_sre
Shalex, 6.7 seems to have resolved several problems I was experiencing with EF Core and Oracle.
Many thanks to the Entity Developer team for your hard work!
I have discovered a new issue with 6.7 and the VS 2019 integration. In a netstandard2.0 SDK style project many of the generated assets are now nested which is great! However, the edps file being nested under the efml is causing an error regenerating the code.
Custom tool error: The node 'XXXXXXXXXXXXXX.edps' cannot be renamed.
If I manually un-nest it by removing the <DependentUpon> element, save the project, close VS, and reopen everything I'm able to regenerate the code one time. After that the edps is re-nested under the efml and the error returns.
Feel free to move this to a new thread if necessary.
TIA
Re: Oracle.EntityFrameworkCore
Posted: Sat 11 Apr 2020 17:18
by Shalex
We cannot reproduce the issue in our environment. Please
send us a test project for reproducing the error.
Re: Oracle.EntityFrameworkCore
Posted: Mon 13 Apr 2020 12:57
by sbauder_sre
I couldn't repro when creating a new model from scratch but it was consistently happening with an existing model created in 6.6.936.0. I recreated that model and the issue disappeared.
So it looks to be related to transitioning from 6.6.936.0 to 6.7.965.0. Perhaps something to do with updating the version numbers in the EDPS? Maybe one of the following:
- <EntityDeveloper Version="6.6.936.0">
- <ed:Property Name="EntitiesConfigurationOutput" Type="EntityDeveloper.TemplateEngine.OutputInfo, EntityDeveloper.Common, Version=6.6.936.0, Culture=neutral, PublicKeyToken=09af7300eec23701">
I'll consider this resolved for my situation and keep it in mind as a gotcha for future model updates.
If you do further testing and find the root cause please let me know. I'd be interested to know what it is.
Thanks!
Re: Oracle.EntityFrameworkCore
Posted: Tue 14 Apr 2020 13:30
by Shalex
If you encounter the same issue with future updates, please contact us again.