.net 各种数据库的实体框架提供程序列表
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1865352/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
A list of Entity Framework providers for various databases
提问by Robert Koritnik
Which providers are there and your experience using them
有哪些提供商以及您使用它们的经验
I would like to know about all possible native .NET Framework Entity Framework providers that are out there as well as their limitations compared to the default LINQ2Entities(from MS for MS SQL). If there are more for the same database even better. Tell me and I'll be updating this post with this list.
我想了解所有可能的本机 .NET Framework 实体框架提供程序,以及它们与默认LINQ2Entities(来自 MS for MS SQL)相比的局限性。如果同一个数据库有多个就更好了。告诉我,我会用这个列表更新这篇文章。
Feel free to add additional providers directly into this post or provide an answer and others (including me) will add it to the list.
随意将其他提供者直接添加到本文中或提供答案,其他人(包括我)会将其添加到列表中。
Entity Framework 1
实体框架 1
Microsoft SQL Server Standard/Enterprise/Express
Microsoft SQL Server 标准版/企业版/Express
- Linq 2 Entities - Microsoft SQL Server connector
- DataDirect ADO.NET Data Providers
- Linq 2 实体 - Microsoft SQL Server 连接器
- DataDirect ADO.NET 数据提供程序
Microsoft SQL Server CE (Compact Edition)
Microsoft SQL Server CE(精简版)
- Any provider?
- 任何供应商?
MySQL
MySQL
MySQL Connector(since version 6.0) - I've read about issues when using
Skip(),Take()andSort()in the same expression tree - everyone welcome to input their experience/knowledge regarding this.Note: MySQL Connector/NET Visual Studio Integration is not supported in the Express Editions of Visual Studio, meaning you won't be able to view MySQL databases in the Database explorer window or add a MySQL data source via Visual Studio wizard dialog boxes. Some users may find that this limits their ability to use Entity Framework and MySQL within Visual Studio Express).
Devart dotConnect for MySQL-
similar issues to MySql's connector as I've read and both try to blame MS for it[these issues are supposed to be solved]
MySQL 连接器(自 6.0 版起) - 我已经阅读了使用 时的问题
Skip(),Take()并且Sort()在同一个表达式树中 - 欢迎大家输入他们的经验/知识。注意:Visual Studio Express 版本不支持 MySQL Connector/NET Visual Studio 集成,这意味着您将无法在数据库资源管理器窗口中查看 MySQL 数据库或通过 Visual Studio 向导对话框添加 MySQL 数据源。一些用户可能会发现这限制了他们在 Visual Studio Express 中使用 Entity Framework 和 MySQL 的能力)。
Devart dotConnect for MySQL-
与我读过的 MySql 连接器类似的问题,两者都试图将其归咎于 MS[这些问题应该得到解决]
SQLite
SQLite
PostgreSQL
PostgreSQL
Oracle
甲骨文
- Devart dotConnect for Oracle
- Sample Entity Framework Provider for Oracle- community effort project
- DataDirect ADO.NET Data Providers
DB2
数据库2
- IBM Data Server Provider has EF support. Here are some limitations.
- DataDirect ADO.NET Data Providers
- IBM Data Server Provider具有 EF 支持。这里有一些限制。
- DataDirect ADO.NET 数据提供程序
Sybase
赛贝斯
Informix
Informix
- IBM Data Server Provider supports Informix
- IBM Data Server Provider支持 Informix
Firebird
火鸟
Provider Wrappers
提供者包装
Entity Framework 4 (beta)
实体框架 4(测试版)
Microsoft SQL Server
微软 SQL 服务器
- Microsoft's Linq to Entities 4 - shipped with .net 4.0 and Visual Studio 2010; so far the only provider for EF4
- Microsoft 的 Linq to Entities 4 - 随 .net 4.0 和 Visual Studio 2010 一起提供;迄今为止唯一的 EF4 提供商
MySQL
MySQL
- MySQL .NET connector, mostly functional but pending issues with CreateDatabase and DatabaseExists methods (v6.3.5)
- Devart dotConnect for MySQL
- MySQL .NET 连接器,主要功能但未决问题与 CreateDatabase 和 DatabaseExists 方法 (v6.3.5)
- 用于 MySQL 的 Devart dotConnect
SQLite
SQLite
PostgreSQL
PostgreSQL
Oracle
甲骨文
Microsoft SQL Server Analysis Services (SSAS)
Microsoft SQL Server 分析服务 (SSAS)
回答by RepDetec
DB2 will work, but if you want to use some of the out-of-the-box .NET features that we all take for granted (think membership and role providers), you will have quite a bit of work on your hands. DB2 doesn't really do well with Stored Procedures, so you are also looking at a lot of parameterized inline SQL.
DB2 可以工作,但是如果您想使用一些我们都认为理所当然的开箱即用的 .NET 特性(想想成员资格和角色提供者),您将有很多工作要做。DB2 在存储过程方面做得并不好,所以您还要查看大量参数化的内联 SQL。
I also had some performance issues with the provider from IBM. There is another provider available from a company called DataDirect. It looks to be more performant, but it will cost you. For something like an external facing website, where speed is important, the cost probably will not be an issue.
我还遇到了 IBM 提供商的一些性能问题。有一家名为 DataDirect 的公司提供了另一个提供程序。它看起来性能更高,但它会花费你。对于像面向外部的网站,速度很重要,成本可能不是问题。
I am sure that DB2 is a great system if you are building on another platform, but it wasn't really designed to play nice with .NET. Unless you are already married to DB2, I would look elsewhere.
如果您在另一个平台上构建,我确信 DB2 是一个很棒的系统,但它并不是真正设计为与 .NET 配合得很好。除非您已经与 DB2 结婚,否则我会寻找其他地方。
回答by camainc
I don't think DB2 works with EF 4 yet. If it does, someone please correct me and tell me how its done. I cannot get the DB2 providers to show up in the Data Source dialogs.
我认为 DB2 还不能与 EF 4 一起使用。如果是这样,请有人纠正我并告诉我它是如何完成的。我无法让 DB2 提供程序显示在数据源对话框中。
回答by Joel
回答by Joel
IBM's Data Server Provider contains some limitations that make it irritating and fragile for more complex query scenarios. Also, EDMX designer doesn't work with Informix tables prefixed with "informix.*". See Here: link text
IBM 的数据服务器提供程序包含一些限制,使其对于更复杂的查询场景变得烦人且脆弱。此外,EDMX 设计器不适用于以“informix.*”为前缀的 Informix 表。请参阅此处:链接文本
回答by Thomas Levesque
You're missing System.Data.SQLitefor SQLite. It's open source, and quite reliable from my experience. As far as I know it was one of the first EF providers for databases other than SQL Server
您缺少SQLite 的System.Data.SQLite。它是开源的,根据我的经验非常可靠。据我所知,它是 SQL Server 以外的数据库的首批 EF 提供程序之一
回答by Devart
The "Skip/Take and ordering" problems were fixed several months ago in the Devart provider.
几个月前,Devart 提供程序中修复了“跳过/接受和订购”问题。
Some notes about the EF4 support
At the moment we provide support for Visual Studio Beta 1 and EF4 Beta 1. We plan to release the build with EF4 support in the end of December - beginning of January.
We cannot call our Entity Framework support an ideal one - this ORM was initially designed for MS SQL Server, so the possibility to take into account the marvels of other DBMSs is significantly limited.
关于 EF4 支持的一些说明
目前我们提供对 Visual Studio Beta 1 和 EF4 Beta 1 的支持。我们计划在 12 月底 - 1 月初发布支持 EF4 的版本。我们不能称我们的实体框架支持是理想的——这个 ORM 最初是为 MS SQL Server 设计的,因此考虑到其他 DBMS 的奇迹的可能性非常有限。
There is a number of problems the one who implements an EF provider is simply unable to work around. Some examples are available here. The main problem is associated with the CROSS APLY and OUTER APPLY statements generated by EF runtime in some cases. Other DBMSs do not provide this statement, so the problem arises with translation. One also should realize that in case of legacy databases EF is generally unappliable.
实现 EF 提供程序的人无法解决许多问题。此处提供了一些示例。在某些情况下,主要问题与 EF 运行时生成的 CROSS APLY 和 OUTER APPLY 语句有关。其他 DBMS 不提供此声明,因此问题出现在翻译中。人们还应该意识到,在遗留数据库的情况下,EF 通常不适用。
We take into account the users that are not satisfied with the default Microsoft designer and ship Entity Developer- a powerful design time tool - with our products.
我们考虑了对默认 Microsoft 设计器不满意的用户,并随我们的产品一起提供了Entity Developer(一种强大的设计时工具)。
回答by Aamol
回答by RedGlyph
MySQL has a connector for EF4, the current version is 6.3.5 and its main functionalities are working fine but it still has issues with a few methods, e.g.
MySQL 有一个用于 EF4的连接器,当前版本是 6.3.5,它的主要功能运行良好,但它仍然存在一些方法的问题,例如
- System.Data.Objects.ObjectContext.CreateDatabase()
- System.Data.Objects.ObjectContext.DatabaseExists()
- System.Data.Objects.ObjectContext.CreateDatabase()
- System.Data.Objects.ObjectContext.DatabaseExists()
which makes it difficult to fully use the model-first approach. It's possible by manually editing the MySQL script (available with the CreateDatabaseScript method). The MySQL team doesn't seem eager to solve those bugs, I'm not sure what the commitment level actually is from their part but it certainly is lower than it once was.
这使得很难完全使用模型优先的方法。可以通过手动编辑 MySQL 脚本(可用于 CreateDatabaseScript 方法)来实现。MySQL 团队似乎并不急于解决这些错误,我不确定他们的承诺水平实际上是多少,但肯定比以前低了。
That being said, the same methods fail with SQL CE too (they are not implemented, and I don't see the MS team as likely to tackle that soon).
话虽如此,同样的方法也会在 SQL CE 中失败(它们没有实现,我认为 MS 团队不太可能很快解决这个问题)。
回答by Fernando Gonzalez Sanchez
The issues with Connector/NET in Take/Skip operators have been fixed long ago (the EF provider is currently compatible with EF 5 & EF 4).
Take/Skip 运算符中的连接器/NET 问题很久以前就已解决(EF 提供程序当前与 EF 5 和 EF 4 兼容)。
Among the bugs fixed:
在修复的错误中:
http://bugs.mysql.com/bug.php?id=45723
http://bugs.mysql.com/bug.php?id=45723
http://bugs.mysql.com/bug.php?id=72148
http://bugs.mysql.com/bug.php?id=72148
http://bugs.mysql.com/bug.php?id=70828
http://bugs.mysql.com/bug.php?id=70828
http://bugs.mysql.com/bug.php?id=69751
http://bugs.mysql.com/bug.php?id=69751
Thanks.
谢谢。

