有没有办法使用 Linq to Oracle
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/30790/
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
Is there a Way to use Linq to Oracle
提问by David Basarab
I can connect with the DataContext to the Oracle database however I get errors in running the query against the oracle database. I looked at the SQL generated and it is for MSSQL and not Oracle PSQL.
我可以将 DataContext 连接到 Oracle 数据库,但是在对 oracle 数据库运行查询时出现错误。我查看了生成的 SQL,它用于 MSSQL 而不是 Oracle PSQL。
Does anybody know of a decent easy to use wrapper to use LINQ against an Oracle Database?
有人知道一个不错的易于使用的包装器来对 Oracle 数据库使用 LINQ 吗?
采纳答案by Greg Hurlman
No, LINQ to SQL is very much MS SQL only - think of it as a client driver.
不,LINQ to SQL 在很大程度上只是 MS SQL - 将其视为客户端驱动程序。
Microsoft 正在/正在帮助 Oracle 和 DataDirect 开发 Oracle 和其他非 MS 数据库服务器的提供程序。
回答by vzczc
We use the OraDirect driver from Devart. It includes ADO.NET Entity framework support. You can download a trial version here. You may then use LINQ to entities or entity SQL on top of this.
我们使用来自 Devart 的 OraDirect 驱动程序。它包括 ADO.NET 实体框架支持。您可以在此处下载试用版。然后,您可以在此基础上使用 LINQ to entity 或实体 SQL。
The pricing of this is quite developer friendly, you pay per developer seat and you may use it however you like.
其定价对开发人员非常友好,您可以为每个开发人员席位付费,您可以随意使用它。
Another big advantage of this driver is that you can use it without installing an Oracle client, this is a big plus and worth the price alone.
该驱动程序的另一大优势是您无需安装 Oracle 客户端即可使用它,这是一个很大的优势,并且物有所值。
@Greg: We evaluated the datadirect drivers as well, but the performance was poor and cost astronomical.
@Greg:我们也评估了 datadirect 驱动程序,但性能很差,而且成本很高。
Edit: It seems DevArt announced a beta with LINQ supportrecently
编辑:似乎 DevArt最近宣布了一个支持 LINQ的测试版
回答by Skeolan
There's also Lightspeedwhich has a per-organization (not per-developer) license scheme and seems to have a pretty solid documentation library and a free trial version (up to 8 entities). I'm checking this out presently.
还有Lightspeed,它有一个按组织(而不是每个开发人员)的许可方案,并且似乎有一个非常可靠的文档库和一个免费试用版(最多 8 个实体)。我目前正在检查这个。
回答by Ivo Limmen
回答by Dillie-O
One thing you might look into is that there is now LINQ to Entities, which leverages the MS Entity Framework, which I believe is DB agnostic. I'm still looking into how it works myself, but if you could create an ADO.NET Data Entity that interfaces with Oracle, you could then use LINQ against that Entity.
您可能会研究的一件事是,现在有 LINQ to Entities,它利用了 MS 实体框架,我认为它与数据库无关。我自己仍在研究它是如何工作的,但是如果您可以创建一个与 Oracle 接口的 ADO.NET 数据实体,那么您就可以对该实体使用 LINQ。
回答by Geoff
Do look at Linq to entities though. I have a datareader populate a collection of objects that are mapped to the oracle table. I can use linq to query that collection in very powerful, simple, and easy ways. I love it. Highly recommend.
不过,请查看 Linq 到实体。我有一个 datareader 填充映射到 oracle 表的对象集合。我可以使用 linq 以非常强大、简单和容易的方式查询该集合。我喜欢它。强烈推荐。
回答by Ramesh
Try Devart LinqConnect. This product allows you to work with Oracle, etc.
试试 Devart LinqConnect。该产品允许您使用 Oracle 等。
回答by Ramesh
Why not try ALinq ? http://www.alinq.org
为什么不试试 ALinq ?http://www.alinq.org
回答by Juan Carlos Velez
Look in codeplex: Linq To Oracle project
在代码中查看: Linq To Oracle 项目
回答by Brian Deragon
Another cross-database solution that works fairly well across Oracle, SQLite, MySQL and SQL Server is eXpress Persistent Objects
另一个跨 Oracle、SQLite、MySQL 和 SQL Server 运行良好的跨数据库解决方案是eXpress Persistent Objects