17

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?

Keith
  • 150,284
  • 78
  • 298
  • 434
David Basarab
  • 72,212
  • 42
  • 129
  • 156

11 Answers11

12

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
  • 17,666
  • 6
  • 54
  • 86
  • 2
    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 Oct 07 '08 at 17:58
  • 1
    See also http://stackoverflow.com/questions/2134847/any-free-linq-provider-available-for-oracle – Paul Hooper Sep 21 '10 at 22:15
  • 2
    The link in the answer appears to be dead. –  Jul 02 '12 at 09:29
  • 2
    This reply is now outdated. [Oracle provides a way to use LINQ](http://download.oracle.com/oll/obe/EntityFrameworkOBE/EntityFrameworkOBE.htm) as of today. Many other resources can be found. – miroxlav Sep 23 '13 at 20:44
10

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
  • 9,270
  • 5
  • 52
  • 61
4

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
  • 4,328
  • 2
  • 19
  • 20
4

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
  • 29,277
  • 14
  • 101
  • 140
4

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
  • 3,095
  • 1
  • 26
  • 23
3

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
  • 9,340
  • 7
  • 38
  • 48
3

Try Devart LinqConnect. This product allows you to work with Oracle, etc.

Ramesh
  • 101
  • 3
2

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

1

Look in codeplex: Linq To Oracle project

Juan Carlos Velez
  • 2,840
  • 2
  • 34
  • 48
0

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
  • 150,284
  • 78
  • 298
  • 434
0

Another cross-database solution that works fairly well across Oracle, SQLite, MySQL and SQL Server is eXpress Persistent Objects

Brian Deragon
  • 2,929
  • 24
  • 44