tags:

views:

37

answers:

2

Could this Oracle query:select * from table(some_stored_procedure(someParameter => :someValue)

be transformed into LINQ?

+1  A: 

I'm not sure what you mean by the question.

If you mean to ask if you can run LinqToSql on Oracle, the answer is that there is no native support for Oracle, but there are some compatibility layers available, such as DevArt DotConnect.

If you mean to ask if you can turn a DataSet or DataTable into a Linq query, the answer is yes. Assuming you have a DataTable called dt with your data in it:

var q = DataTable.Rows.Cast<DataRow>().Select(r => new { Column1 = r["Col1"], Column2 = r["Col2"] });

You get the idea...

Shaul
I know about the latter, but sounds like your former is what I need.
Chaotic_one
+1  A: 

I think you are looking for an entity framework provider for Oracle. There are a couple around. Shaul mentioned DevArt's, there's also a simple one on codeplex.

vc 74
Yep, my question is really more on how to implement database-specific queries in LINQ. I'll check your solution too, thanks.
Chaotic_one