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.
To execute a LINQ query against an Oracle database, you will add a reference to an Entity Framework assembly. You will then create the code to execute a LINQ query and return the results to the console window.
LINQ to SQL was the first object-relational mapping technology released by Microsoft. It works well in basic scenarios and continues to be supported in Visual Studio, but it's no longer under active development.
Yes. See this step by step tutorial of Entity Framework, LINQ, and Model-First for the Oracle database (11G), and using Visual Studio 2010 with .
More importantly: when it comes to querying databases, LINQ is in most cases a significantly more productive querying language than SQL. Compared to SQL, LINQ is simpler, tidier, and higher-level. It's rather like comparing C# to C++.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With