Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why doesn't Entity Framework support ODBC?

Is there a specific reason that the EF requires new data providers and can't make use of ODBC? I figured it had to be some ORM specific problem, but NHibernate works fine via ODBC.

I'm using NHibernate and can continue to use Nhibernate, but I worry that I can't assume Nhibernate knowledge for any future programmers here.

like image 448
anonymous Avatar asked Dec 05 '08 16:12

anonymous


1 Answers

The Entity Framework doesn't require new data providers, exactly. Rather, it requires Entity Framework providers which extend existing data providers, to provide additional services required by the Entity Framework, such as complex SQL generation, which are not part of the existing ADO.NET data model. I don't think that there's anything stopping anyone from writing an Entity Framework provider for ODBC based on the existing ADO.NET 2.0 ODBC bridge. You can download the source code for a sample SQL Server provider for more information about exactly what services are required when extending an existing ADO.NET provider for the Entity Framework.

like image 89
Craig Stuntz Avatar answered Oct 11 '22 14:10

Craig Stuntz