Please help me figure out how to make the right connection to the Oracle database in MVC 4 in VS 2015. I’m just learning MVC, I wrote the following in the console application: I connected Oracle.DataAccess.dll then:
try { string oradb = "Data Source = 192.168.0.2/orcl; User id = user; password = 1234"; OracleConnection connect = new OracleConnection(oradb); connect.Open(); OracleCommand cmd = new OracleCommand(); cmd.Connection = connect; cmd.CommandText = "Select * from users"; OracleDataReader dateReader = cmd.ExecuteReader(); dateReader.Read(); Console.WriteLine("Test{0}", dateReader.GetChar(1)); } catch (Exception ex) { Console.WriteLine("Ошибка{0}", ex); } Help, if possible with an example, thank you very much