Page 1 of 1

Configuring EF 6 to use dotConnect for Oracle in ASP.NET 5 web project

Posted: Fri 11 Dec 2015 18:15
by cmisDevSupport
Hi I have created an ASP.NET 5 / MVC 6 project to expose my Web API.

I am using Entity Framework 6 in a separate project in the same solution. How do I configure my ASP.NET 5 web project to use the dotConnect for Oracle driver since there is no longer a web.config file available.

I saw you offered a code based configuration option. So I tried to decorate my class that derives from DbContext class with your [DbConfigurationType(typeof(OracleEntityProviderServicesConfiguration))] attribute. Then configured the connection string in the config.json file. Finally I modified the Startup.ConfigureServices() method to get the connection string and add my DbContext service instance to the IoC container.

Example:
var connectionSettings = Configuration["Data:MyDbContext:ConnectionString"];
services.AddScoped((c) => new MyDbContext(connectionSettings));

Re: Configuring EF 6 to use dotConnect for Oracle in ASP.NET 5 web project

Posted: Fri 11 Dec 2015 22:03
by cmisDevSupport
By the way I left off from the original post that the code based configuration approach is not working for me either.

Re: Configuring EF 6 to use dotConnect for Oracle in ASP.NET 5 web project

Posted: Thu 17 Dec 2015 14:27
by Shalex
cmisDevSupport wrote:I am using Entity Framework 6 in a separate project in the same solution. How do I configure my ASP.NET 5 web project to use the dotConnect for Oracle driver since there is no longer a web.config file available.
1. We did not test this approach but it should be possible to use Entity Framework 6 with ASP.NET 5:
https://github.com/aspnet/EntityFramework/issues/2336
http://stackoverflow.com/questions/2929 ... et-5-mvc-6
2. EF6 provider specific article: http://blog.devart.com/entity-framework ... force.html.

Re: Configuring EF 6 to use dotConnect for Oracle in ASP.NET 5 web project

Posted: Fri 08 Jan 2016 15:45
by cmisDevSupport
Hi,

I have already read through the links that you have provided prior to submitting this post with no success. I have an immediate need. Is the forum the only available technical support option? Is there a way to talk to someone directly in technical support so I can resolve this issue or at least verify if dotConnect for Oracle driver supports ASP.NET 5/MVC 6 projects.

Re: Configuring EF 6 to use dotConnect for Oracle in ASP.NET 5 web project

Posted: Fri 08 Jan 2016 15:52
by cmisDevSupport
I do have my ASP.NET project working with Entity Framework 6. That is not the problem. The issue is that I am unable to configure EF6 to use the devConnect Oracle driver. Where do I do that given the absence of the web.config files with the new ASP.NET 5/MVC6 project?

Re: Configuring EF 6 to use dotConnect for Oracle in ASP.NET 5 web project

Posted: Mon 11 Jan 2016 19:25
by Shalex
cmisDevSupport wrote:Where do I do that given the absence of the web.config files with the new ASP.NET 5/MVC6 project?
The http://blog.devart.com/entity-framework ... edExamples section includes the corresponding examples. If this doesn't help, please upload your test project, which works with System.Data.SqlClient, to some file exchange server. We will try to set it up for using Devart.Data.Oracle. If the test project doesn't exceed the 2 MB limit, you can upload it via our contact form.

Re: Configuring EF 6 to use dotConnect for Oracle in ASP.NET 5 web project

Posted: Fri 18 Aug 2017 19:54
by aambikavally
Does anybody have a solution to this? Why don't we have documentation or even a simple sample for this scenario?

Re: Configuring EF 6 to use dotConnect for Oracle in ASP.NET 5 web project

Posted: Mon 21 Aug 2017 13:12
by Shalex
Please refer to https://www.devart.com/dotconnect/oracl ... ntity.html. Is that what you need?