C# 什么是一些好的实体框架替代品

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1841555/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-06 21:19:20  来源:igfitidea点击:

What are some good Entity Framework Alternatives

c#sqlorm

提问by Luke101

I am using the Entity Framework now and constantly having to write inline sql because Entity framework does not support full text search and other features. Is there a ORM out there that has many features that supports advanced queries? I feel if I am going to sometimes write inline sql I might as well do all of it in inline sql. Any help here

我现在正在使用实体框架,并且经常不得不编写内联 sql,因为实体框架不支持全文搜索和其他功能。是否有一个 ORM 具有许多支持高级查询的功能?我觉得如果我有时要编写内联 sql,我不妨在内联 sql 中完成所有这些。任何帮助在这里

采纳答案by Alex Yakunin

Take a look at:

看一眼:

回答by Paul Sasik

Have you looked at nHibernate?

你看过nHibernate吗?

If you search for nHibernate and full text searchyou'll come up with a variety of links that talk about that particular type of search implementation.

如果您搜索nHibernate 和全文搜索,您将找到各种讨论特定类型搜索实现的链接。

回答by Michael Gattuso

NHibernateis one of the bigger OR/M alternatives and Open Source that I like. It is can do some pretty "advanced" things but has a steep learning curve.

NHibernate是我喜欢的更大的 OR/M 替代品和开源之一。它可以做一些非常“高级”的事情,但学习曲线陡峭。

回答by anishMarokey

Try with nHibernate

尝试使用nHibernate

回答by μBio

Seconding what the others said, nHibernate. Plus I found this linkre: full text search and nHibernate.

借用其他人所说的,nHibernate。另外我发现这个链接re:全文搜索和nHibernate。

回答by Brian Sullivan

You might look at LLBLGen Proor Telerik's OpenAccess, but NHibernate is going to be the solution with the largest community around it.

您可能会查看LLBLGen Pro或 Telerik 的OpenAccess,但 NHibernate 将成为拥有最大社区的解决方案。

回答by LJW

I feel if I am going to sometimes write inline sql I might as well do all of it in inline sql

我觉得如果我有时要编写内联 sql,我也可以在内联 sql 中完成所有这些工作

Seriously? When using any ORM, you're always going to hit situations where it is better, cleaner, or more performant, to use SQL or call a stored proc. You shouldn't just blindly trust it do absolutely everything for you in all situations.

严重地?使用任何 ORM 时,您总是会遇到使用 SQL 或调用存储过程更好、更干净或性能更高的情况。你不应该只是盲目地相信它在所有情况下都能为你做任何事情。

回答by Kevin Pang

Most ORMs will still require some inline SQL every now and then. NHibernate, Linq 2 Sql, etc. don't support full text search out of the box (NHibernate has NHibernate.Search which uses Lucene.NET to perform full text search, Linq 2 Sql has access to stored procedures that you can create that use full text search).

大多数 ORM 仍然会时不时地需要一些内联 SQL。NHibernate、Linq 2 Sql 等不支持开箱即用的全文搜索(NHibernate 有使用 Lucene.NET 执行全文搜索的 NHibernate.Search,Linq 2 Sql 可以访问您可以创建的存储过程,使用全文检索)。

This doesn't mean you should scrap using an ORM altogether though. There's a tonof repetitive plumbing code that ORMs can save you from writing and the general use cases are all relatively easy to execute (e.g. CRUD operations) with any ORM.

不过,这并不意味着您应该完全放弃使用 ORM。有一的重复管道代码的ORM可以从写作拯救你们,一般使用情况下都比较容易执行(如CRUD操作)与任何ORM。

回答by Arthur C

Like most people here I'd recommend NHibernate, but you may want to look into using it in conjunction with CastleProject's ActiveRecordimplementation. NHibernate by itself can take a bit of getting used to, but when you throw ActiveRecord on top of it things get a lot easier. I was able to do an EntityFramework->NHibernate/ActiveRecord conversion really quickly.

像这里的大多数人一样,我建议使用 NHibernate,但您可能想考虑将它与CastleProject 的 ActiveRecord实现结合使用。NHibernate 本身可能需要一点时间来适应,但是当您将 ActiveRecord 放在它上面时,事情会变得容易得多。我能够非常快速地进行 EntityFramework->NHibernate/ActiveRecord 转换。

回答by JonSG

I'm a fan of SubSonicby Rob Conery. It is (was) simple and easy to set up and use.

我是Rob Conery的SubSonic的粉丝。它(曾经)简单且易于设置和使用。