First off I have read other posts about connecting to an Oracle database, unfortunately they could not help me. I'll describe what I have tried and hopefully someone can point me in the correct direction.
First off I tried to install ODTwithODAC122010 as many sources are saying,but this one gives me a few process exited with non zero exit code. It says it's successful but nothing seems to be changed.
Next to that I tried installing ODTforVS2017_122010.exe I have an updated Visual Studio professional. It says the installation is a success. This however does not seems to add any option like tutorials describe. With this I mean that there should be something visible in;
visual studio tools -> connect to database -> Oracle database, data provider menu should have something like Oracle for.. This doesn't show up unfortunately..
So I tried connecting to the database in my visual studio project selecting the .net framework data provider for oracle. Here three fields are asked: Server name username and password. I tried filling them in but it couldn't connect. For server name I used: IPADDRESS:PORT/SERVICENAME
After that I gave up hope for connecting to the database through visual studio (I can connect to the database using oracle SQL developer).
Then I installing the following nuget packages: - Oracle.ManagedDataAccess - System.Configuration.ConfigurationManager - System.Security.Permissions - System.Security.Principal
And wrote a piece of code to connect to the database like:
using(OracleConnection connect = new OracleConnection(ConnectionDetails.returnConnectionString()))
{
connect.Open();
Console.WriteLine("did it work?" + connect.ServerVersion);
}
Where returnConnectionString returns:
"User Id=MYID;Password=MYPASSWORD;Data Source=IPADDRESS:PORT/SERVICENAME"
Unfortunately when I try to run this I'm facing a ExecutionContext.cs not found. This is happening at connect.open();
I'm launching this code at:
public static void Main(string[] args)
{
var a = new DatabaseConnector();
a.test();
BuildWebHost(args).Run();
}
As I final word I want to make it clear that I'm using ASP.NET Core and that your suggestions and help will be greatly appreciated!