10

i know that linq to sql is really "LINQ to SQL Server". I also read that one can build his own LINQ Provider in order to connect to other database systems like oracle or mysql. my question is how to build a LINQ Provider and what are the advantages and disadvantages of using LINQ to SQL on databases other than SQL Server.

Ali Tarhini
  • 5,278
  • 6
  • 41
  • 66

4 Answers4

12

LINQ to SQL doesn't support Oracle, but the Entity Framework has a more open provider model, and there are Oracle drivers which support EF.

So basically, for non-SQL Server databases I would ignore LINQ to SQL completely and look to EF. LINQ to SQL simply wasn't built with a provider model for extensibility to arbitrary databases.

Jon Skeet
  • 1,421,763
  • 867
  • 9,128
  • 9,194
8

Here is a good article which describes how to build a LINQ provider:

Building a LINQ Provider

Pragmateek
  • 13,174
  • 9
  • 74
  • 108
Viper
  • 2,216
  • 1
  • 21
  • 41
  • 1
    Whilst this may theoretically answer the question, [it would be preferable](//meta.stackoverflow.com/q/8259) to include the essential parts of the answer here, and provide the link for reference. – Gert Arnold Feb 05 '16 at 16:04
5

You can use this LINQ to Oracle

But Linq to SQL not so good for ORM as Nhibernate, or Entity Framework. Nhibernate works with Oracle, MS SQL server, My SQL et. EF - works with MS SQL Server.

Sergey K
  • 4,071
  • 2
  • 23
  • 34
4

You can try 3-rd party ORMs - for example, LinqConnect, NHibernate, etc. But as for me - LINQ to SQL is flexible and allows you to start quickly.

JackD
  • 597
  • 4
  • 7