tags:

views:

5635

answers:

11

I can connect with the DataContext to the Oracle database however I get errors in running the query against the oracle database. I looked at the SQL generated and it is for MSSQL and not Oracle PSQL.

Does anybody know of a decent easy to use wrapper to use LINQ against an Oracle Database?

A: 

Not an easy way, at least until a good provider is produced.

Really MS should provide at least an OLEDB Linq provider. After all, Linq to Sql is basically an implementation of IQueryable with designer support.

Keith
+5  A: 

No, LINQ to SQL is very much MS SQL only - think of it as a client driver.

Microsoft is/was helping Oracle and DataDirect develop providers for Oracle and other non-MS database servers.

Greg Hurlman
The 3rd party DevArt (formerly CoreLAB) OraDirect.Net libraries are working on LINQ to Oracle support (they're in beta as I write this) - see @vzczc's answer: http://stackoverflow.com/questions/30790/is-there-a-way-to-use-linq-to-oracle#32467
Andrew
See also http://stackoverflow.com/questions/2134847/any-free-linq-provider-available-for-oracle
Paul Hooper
A: 

Does this bring up a reason as to why you should stay away from Linq. I like the idea of Linq, and the technology in general, but it seems like another way to get locked even tighter to the MS Stack.

Kibbee
+4  A: 

One thing you might look into is that there is now LINQ to Entities, which leverages the MS Entity Framework, which I believe is DB agnostic. I'm still looking into how it works myself, but if you could create an ADO.NET Data Entity that interfaces with Oracle, you could then use LINQ against that Entity.

Dillie-O
+3  A: 

Do look at Linq to entities though. I have a datareader populate a collection of objects that are mapped to the oracle table. I can use linq to query that collection in very powerful, simple, and easy ways. I love it. Highly recommend.

Geoff
+8  A: 

We use the OraDirect driver from Devart. It includes ADO.NET Entity framework support. You can download a trial version here. You may then use LINQ to entities or entity SQL on top of this.

The pricing of this is quite developer friendly, you pay per developer seat and you may use it however you like.

Another big advantage of this driver is that you can use it without installing an Oracle client, this is a big plus and worth the price alone.

@Greg: We evaluated the datadirect drivers as well, but the performance was poor and cost astronomical.

Edit: It seems DevArt announced a beta with LINQ support recently

vzczc
+3  A: 

There's also Lightspeed which has a per-organization (not per-developer) license scheme and seems to have a pretty solid documentation library and a free trial version (up to 8 entities). I'm checking this out presently.

Skeolan
+3  A: 

After a long search I found DbLinq and should do the trick. I am going to try it myself. I came across your question because I was searching for the same solution. Hope it helps.

Ivo Limmen
I have tried DBLinq. It is not the quite the same syntax as Linq to SQL, but it is close enough.
David Basarab
+1  A: 

Why not try ALinq ? http://www.alinq.org

A: 

i use alinq but is a trial version, how i cant take a free full version, not e trial version?

A: 

Try linq to XSD!

Add a new item to your project, and select dataset, from there you can setup a connection in your server explorer and drop the tables in much like you do in linq-to-sql!

I use it all the time!