为什么Entity Framework不支持ODBC? [英] Why doesn't Entity Framework support ODBC?
问题描述
我使用NHibernate,可以继续使用Nhibernate,但我担心我不能为任何未来的程序员在这里假设Nhibernate知识。
实体框架不需要新的数据提供者。相反,它需要扩展现有数据提供者的实体框架提供商,以提供实体框架所需的附加服务,例如复杂的SQL生成,这些不是现有ADO.NET数据模型的一部分。我不认为有任何人阻止任何人根据现有的ADO.NET 2.0 ODBC桥接程序为ODBC编写实体框架提供程序。您可以下载示例SQL Server提供程序的源代码,以获取有关所需服务的更多信息当扩展实体框架的现有ADO.NET提供程序时。
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.
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.
这篇关于为什么Entity Framework不支持ODBC?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!