LINQ2SQL Database providers - linq-to-sql

I have heard that LINQ2SQL has been written to support multiple database vendor providers however for internal political reasons at MS, only SQL Server has been supported.
Is this a fair summary of the situation, and if so has a timetable been released as to when other databases will be supported?
I am aware of Matt Warren's BUILDING AN IQUERYABLE PROVIDER series on the wayward weblog, but I would prefer not to build something now that will be released (probably better than I will do it) later

Check the ADO.NET Entity Framework (and Linq to Entities), you can look here also a Sample Entity Framework Provider for Oracle, and here are more examples about creating Data Providers for EF.

Entity Framework has support for multiple database providers. There are no plans to expose or implement additional LINQ to SQL database providers.

Related

Supporting multiple databases with entity framework

My client has an asp.net application - a product used my several customers. It connects to MSSQL database using good old ado.net and stored procedures. I am supposed to rewrite the application so that the application supports MySQL and Oracle in addition to MSSQL. I am supposed to use entity framework to do this. I am new to EF. So can any one guide me as to how this can be done? Where should I start?

Is Entity Framework a good choice for an asp.net application that has to connect to MsSql,Mysql and Oracle databases?

I want to know if Entity Framework can be used to create an architecture such that the asp.net application connects to MSSql,Mysql and Oracle database just by changing the connection string. If it is possible how do I proceed with it? If not what is the next best alternative? I am working on a product that is used by different customers - some prefer MsSql, some prefer Mysql and very few prefer Oracle. This means all three databases will have identical schema.
I have used EF with both Oracle and SQL Server. It works really well with SQL Server and reasonably well with Oracle.
However, I wouldn't have the application talk directly to EF itself. There are bound to be subtle differences between the databases that you don't want your core application to deal with. Instead, use something like the Repository Pattern and have your app talk to a repository interface. Create a repository for each database that you can plug into your app. You can certainly use EF in your repositories to map data between the database and your domain classes; but as good practice, your application shouldn't know about your data access or database technology.
If you are planning to use entity framework 6, currently not supported by oracle. But EF 5 would work right now. I am very optimistic that oracle would provide support for ef 6 in future. I have used EF5 to connect to mysql, oracle and sql server successfully using repository pattern and unit of work pattern and running successfully in production. Read also domain driven design (domain driven pattern/table pattern) and onion architecture

Any better way to use Oracle/MySQL with .NET Entity Framework?

I wonder the simplicity of working with Microsoft SQL database server with .NET Entity Framework. Is there a possible way to use it with Oracle & MySQL database servers?
You could use another ORM, like NHibernate which supports Microsoft SQL, Oracle, and MySQL, among many others.
If you want/need to stick with EF, there are already questions on SO about using it with MySQL and with Oracle.
Oracle Data Access Components for .NET (http://www.oracle.com/technetwork/topics/dotnet/downloads/oracleefbeta-302521.html) includes also Oracle Data Provider for .NET 4 11.2.0.2.40.
A nice tutorial how to use Model-First approach can be found at http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/dotnet/EntityFrameworkOBE/EntityFrameworkOBE.htm.
Good luck,
LM
A list of Oracle providers for Entity Framework can be found here:
Comparison of Entity Framework compatible providers for Oracle?
And for MySQL these are available:
http://www.mysql.com/products/connector/
http://www.devart.com/dotconnect/entityframework.html
http://uda.openlinksw.com/dotnet/

How to use different providers for Linq to entities?

I'm trying to familiarize myself a bit more with database programming, and I'm looking at different ways of creating a data access layer for applications. I've tried out a few ways but there is such a jungle of different database technologies that I don't know what to learn. For instance I've tried using datasets with tableadapters. Using that I am able to switch data provider rather easily (by programming against the interfaces such as IDbConnection). This is one thing I would want to achieve. But I also know everyone's talking about LINQ, and I'm trying to get to know that a bit better too. So I have tried using Linq to Sql classes as the data access layer as well, but apparently this is not provider independent (works only for SQL Server).
So then I read about the Entity Framework (which just as Linq to SQL apparently has gotten its share of bashing already...). It's supposed to be provider independent everybody says, but how? I tried out a tutorial to create an entity data model, but the only providers to choose from were SQL Server/Express. Just for learning purposes, I would like to know how to use the entity framework with MS Access/OleDb.
Also, I would appreciate some input on what is the preferred database technology for data access. Is it LINQ still after all the bashing, or should you just use datasets because they are provider independent? Any pointers for what to learn would be great, because it's just too much to learn it all if I'm not going to use it in the end...!
the only providers to choose from were SQL Server/Express
The .NET Framework only includes EF providers for SQL Server and SQL Server Compact. If you need to access another DBMS, you need to install a third-party provider. For instance, there's a free provider for SQLite, with designer support. There are also a few (commercial) providers made by Devart, for various DBMS. As far as I know, there are no EF providers for OleDB or ODBC...
I really like the metaphor from Scott Hanselman: "I'm not a plumber, but I do know what an S-Bend is."
Personally, I think you should have a working knowledge of all the variety of ways to access data.
ADO.Net, EF, Linq2Sql, txt files, xml etc etc etc.
Have a look at the Nerd Dinner and the Music Store samples. See the way they access data (how do they do Unit Tests, Mocking framework, IOC etc)
Regarding data providers, personally I would avoid Access. It is just as easy to get a Sql Express or Mysql installation running and looks better on your resume.
(For what its worth, this question discusses setting up mysql for EF.)

Best way to take advantage of .NET 3.5

I currently have an asp.net web application which is using seperate assemblies for the data access, the business logic,
entity objects, and the web user interface. The data access was created using Microsoft's Data Access Application Block
compilied as a .NET 2.0 assembly. Stored procedures were used for the actual moving of data in and out of the database
(SQL 2005).
I would like to update this application to a take advantage of the new features of .NET 3.5 such as Linq, data entities,
etc. What would be the best approach to make this happen?
I was doing some research about this topic and I found this article very useful.
http://blogs.msdn.com/dsimmons/archive/2008/05/17/why-use-the-entity-framework.aspx
Obviously, .net 3.5 has lots of new features if you compare to 2.0. one of them as you stated Linq(to SQL and to XML). which enables you to write strongly-typed language integrated queries. as you may know as well as querying your entities by using LINQ, you can query your collections and XML files.
Also you can use ADO.NET entity framework for mapping your database tables to classes. I am not sure about performance aspect. u might need to do some investigation about it.
dont forget to do your regression tests after you have developed new version of your application.
I know it is general information... I hope it helps.
Cheers