Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to access oracle data using Linq through ADO.net?

I am doing this to connect database using sql.

    OracleConnection conn = new OracleConnection();
    conn.ConnectionString = "Data Source=XE;uid=HR;pwd=fusion;";
    conn.Open();
    OracleCommand command = new OracleCommand("Select * from Students", conn);
    DataSet ds = new DataSet();
    OracleDataAdapter oraDa = new OracleDataAdapter(command);
    oraDa.Fill(ds, "Students");
    return ds.Tables["Students"];

But I want to use Linq instead of SQL. I heard it is possible using Entities.

like image 376
YogeshWaran Avatar asked Nov 14 '11 16:11

YogeshWaran


1 Answers

There are some third party providers that support EF today. Personally I have been using Devart dotConnect for Oracle for some time. Datadirect is another such option.

Oracle has a beta version of it's ODP.Net provider supporting EF, I haven't tried to use it yet.

like image 136
GTG Avatar answered Oct 17 '22 13:10

GTG