How to add Oracle provider in VS2017 for Entity Framework? - c#

I want to connect to a database(Oracle 12c) for generating ADO.NET model, Code First From Database. I have installed ODAC for VS but there is still no option for connecting Oracle DB at the Entity Data Model Wizard:
At Server Explorer there is a Oracle provider but it is stated as deprecated:
I've also tried to install the following 4 Nuget packages but still no Oracle provider at Entity Data Model Wizard:
I'm suspecting VS2017(Community) is not looking at where I installed ODAC for the list of providers it use but I can't figure where it store this configuration.
Is there anything I'm missing? Or is there other ways to use EF for Oracle? E.g. Fallback to VS2015, create entity models manually (how do I do that?), etc.
Please help me I don't want to write plain SQL in code ever again! Thanks.

I have the same error. I solve this problem by add Oracle database from Visual 2015. And then Open project by Visual 2017. It done. I has been read a lot of topic about this. They say now, Oracle not yet Support for connecting Oracle DB at the Entity Data Model Wizard you can see at here:
https://community.oracle.com/thread/4024914

There is something extra:
Nuget package manager suggests Oracle.ManagedDataAccess.EntityFramework 18.3.0
This won't work with the latest ODP.
Nuget Package versions should match ODP versions:
ODP 12.2.0.1.1
Nuget Oracle.ManagedDataAccess.EntityFramework 12.2.1100
If not the Entity Data Model Wizard will crash without leaving any trace in the
C:\Users\YOURUSER\AppData\Roaming\Microsoft\VisualStudio

I solved this by installing Oracle Developer Tools for Visual Studio 2017

I hade the sam problem, but found the solution here:
Do not use the .NET driver. Use the ODP.NET driver (managed or unmanaged).
http://www.oracle.com/technetwork/topics/dotnet/whatsnew/vs2012welcome-1835382.html
Create a new connection from Server Explorer in Visual Studio and use these images as guides: change the datasource, making sure to choose the flavor of ODP.NET that your .NET application will use (Managed or Unmanaged) - and then connect to oracle. In the Oracle connection dialog, if you have a connection alias choose a "Connection Type" of "TNS" and then choose the alias from the "Data Source Name" drop down list. If you do not have a connection alias, you can choose a Connection Type of "EZ Connect" and then provide the host, port, and service name for the database you wish to connect to.
Best Regards, Par

I was facing same problem. first ensure that you installed odac for visual studio 2017
just go this link and follow:
https://www.oracle.com/technetwork/topics/dotnet/downloads/odacmsidownloadvs2017-3806459.html
uninstall previous odac version.
Hopefully, if you install from the link, you will get all things.

Related

Trying to use Entity Framework with Oracle DB

Hi I am trying to use Entity-Framework in asp.net MVC , for that I have installed Oracle.Managed.DataAccess version 19.6.0 and Oracle.Managed.DataAccess.EntityFramework version 19.6.0
and oracle version 11.2.0 I am able to connect Oracle DB in server explorer but while adding new item in solution not getting any option to connect Oracle DB what is the issue I am not able to identify ,Any idea would be appreciated.
Image
Those are just the Nuget packages to allow your project to connect to Oracle.
I believe you need to add Oracle Developer Tools for Visual Studio to have the options available in the Visual Studio dialogs.
https://www.oracle.com/database/technologies/developer-tools/visual-studio/
You need to install a Oracle Client and TNSNAMES.ORA
The installation has a component list, if you insall that components (like Oracle developer Tools for visualStudio) it you can add your EF. and then when you finish you only need to add your TNSNAMES in order to create the Entities in VS.

Entity Framework Database First generation crash MYSQL

I am trying to generate code from an existing MySql database.
I'm following this guide: https://msdn.microsoft.com/en-us/library/jj206878(v=vs.113).aspx
When I select the database from my data connections the wizard just disappears. I have read something about this being caused by MySql NuGet packages version mismatch, but I seem to have the correct versions. These are my installed NuGet packages.
Also, I see a lot of mention of "Connector/Net" can someone tell me what that is?
The wizard closing is a known bug in MySQL Connector/NET:
Bug 89338 for 6.10.5
Bug 91195 for 8.0.11
You will need to wait for Oracle to fix this bug and ship an update. Some people have reported being able to work around the problem by following these instructions.
"Connector/NET" is just another name for the MySql.Data library plus the additional Visual Studio addins; for example, it's used in this documentation.

Connecting to MySQL in VS2017 in ASP.NET MVC 5 project

I'm new to ASP.NET and MVC, trying to move from WinForms. I'm using Visual Studio 2017 Pro, and I am trying to follow some tutorials for connecting to an existing MySQL database. I plan to use the Database First method as the database already exists. I have the following config :-
Windows 10 Pro 64 bit on my PC
VS 2017 Pro
MySQL for Visual Studio 2.0.5
MySQL Connector 6.10.4
EntityFramework v6.2.0
Mysql.Data 6.10.4
Mysql.Data.Entity 6.10.4
Mysql.Web 6.10.4
I can make a database connection using the Server Explorer, but when I'm using the EDM wizard to create the model from the database, the connection isn't showing in the drop-down box, and if I try to create a new one, the MySQL driver doesn't show as an available option, only SQL Server.
I've tried various combinations of MySQL for VS, MySQL Connector, EF and MySQl components (older versions) but I can't seem to find a winning combination.
Has anyone managed to achieve this ? I'm pulling out what's left of my hair. Thanks.
enter image description here
OK I finally found an answer, I now have EF 6.1.3 and MySQL Connector 6.9.9 installed.
I needed to change the part of the Web.Config file as described by James Wilkins in this post.
Thanks to Panagiotis for your help.

Can't install ADO.NET provider for sqlite in VS2013

after reading this article missing SQLite data provider in VS 2013 , I've tried to register SQLITE provider for VS 2013 installing the specific provider with ddex included but with no result.
When I reboot VS 2013 I can't find it in the list of ADO.NET provider and I can't create the Model for my sqlite DB.
Managing app.config of my application I was able to load dinamically the provider but this is not a good choice for my developer's team.
I've also tried to install SQL Server Compact & SQLite Toolbox for VS but now I can see only SQLCE provider and not Sqlite.
Searching DATAPROVIDER in windows registry i've seen that the Sqlite provider and SQLCE provider were installed in two different ways, infact under supported object for SQLCE data provider I can find many reference to Visual Studio(ex: IVsDataAsyncCommand) , while under Supported object of SQLite provider I can see any reference to Visual studio.
In my opinion the problem is here.
Is there a simple way to register DDEX SQLite provider on VS 2013 in windows registry or any other type of operation to do to register this provider definitively?
Thanks in advance,
Fabio
you go to the page of System.Data.SQLite download page.
You have to download and install the correct BUNDLE package, depends on your framework and VS version.
Assuming framework 4.5.1 you have to download
sqlite-netFx451-setup-bundle-x86-2013-1.0.94.0.exe
This is the only setup package that is capable of installing the design-time components for Visual Studio 2013.

Visual Studio 2013 Server Explorer custom data provider: MongoDB

Is there any way to add MongoDB as a custom data provider in Visual Studio 2013 Ultimate?
Server Explorer / Connect to Database
I have installed the latest MongoDB C# driver.
There are two APIs to be found on the network, both of them implements the ODBC standard:
One NYU Master's Degree (summer) project, which is compatible with the C++ driver;
Another, which is provided by Simba Technologies and available for a trial run.
After downloading and installing the connector, one must perform a setup with the provided administrator tool, as shown in the following picture.
After testing the connection in the ODBC Data Source Administrator, one should head over to the Visual Studio's interface, where the Database Connection setup is. One must choose the .NET Framework Data Provider for ODBC as a data provider, and the Simba connector will be available, as the following picture shows:
That's all!
Another ODBC driver was recently released that can be used here. It has a unique feature in that it exposes the nested MongoDB data model as a set of relational tables. As a result, the interaction with "relationally" minded apps like Visual Studio will be drastically improved:
http://www.progress.com/products/datadirect-connect/odbc-drivers/data-sources/mongodb
You should add the references to the MongoDB driver to your project.
You can do this by right clicking on your project in the solution explorer.
And then click Add Reference. Then you can locate the dlls from the MongoDB Driver.
After that you can use them in code.
Source:
http://msdn.microsoft.com/en-us/library/wkze6zky.aspx
http://www.drdobbs.com/database/mongodb-with-c/240151668?pgno=2

Categories