What are some good Entity Framework Alternatives [

2020-07-02 09:08发布

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

标签: c# sql orm
12条回答
在下西门庆
2楼-- · 2020-07-02 09:34

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).

This doesn't mean you should scrap using an ORM altogether though. There's a ton of 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.

查看更多
劳资没心,怎么记你
3楼-- · 2020-07-02 09:37

Have you looked at nHibernate?

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

查看更多
做个烂人
4楼-- · 2020-07-02 09:40
仙女界的扛把子
5楼-- · 2020-07-02 09:41

Like most people here I'd recommend NHibernate, but you may want to look into using it in conjunction with CastleProject's ActiveRecord implementation. 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.

查看更多
老娘就宠你
6楼-- · 2020-07-02 09:42

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

查看更多
女痞
7楼-- · 2020-07-02 09:47

NHibernate is 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.

查看更多
登录 后发表回答