什么是良好的ORM for .NET能够很好地实现并发性?

时间:2021-09-06 06:56:09

I am looking for a well rounded ORM that handle concurrency with ease for .NET. It should also be threadsafe.

我正在寻找一个全面的ORM,它可以轻松地处理.NET的并发性。它也应该是线程安全的。

Any recommendation? Pls elaborate why you choose this particular ORM.

有什么建议?请详细说明您选择此特定ORM的原因。

4 个解决方案

#1


The best thing to use today is still NHibernate. It has been around the longest (see Hibernate for java) and just gets it done. Also, there are many tools out now that make working with it much easier. It blows LINQ to SQL out of the water in terms of features (though not ease of use). The Entity Framework in version 1 is not ready for use. The next version (Entity Framework 4.0) will be much better and may be worth looking at once it is out.

今天最好的用途仍然是NHibernate。它已经存在时间最长(参见Java的Hibernate)并且完成它。此外,现在有许多工具可以更轻松地使用它。它在功能方面使LINQ to SQL脱颖而出(尽管不易使用)。版本1中的实体框架尚未准备好使用。下一个版本(Entity Framework 4.0)会更好,一旦它出来可能值得一看。

#2


I didn't understand the threadsafe part of it.Assuming that you are referring to db access I'd say Nhibernate does this best IMHO(though handling concurrency is fundamental to any ORM).

我不明白它的线程安全部分。假设你指的是db访问我会说Nhibernate做了最好的恕我直言(虽然处理并发是任何ORM的基础)。

Ideally I would want to live in a world where each one gets his turn for the pie. Unfortunately that won’t happen and until then I would try one of these strategies with Nhibernate.

理想情况下,我希望生活在一个每个人都能轮到馅饼的世界里。不幸的是,这不会发生,直到那时我会尝试使用Nhibernate这些策略之一。

Optimistic, Dirty, Versioned or Pessimistic

乐观,肮脏,版本化或悲观

Apply these based on your need.
Your choice of an ORM should be based on how active the community and eco-system behind it is and not just by its feature set(though that's a factor of the community).

根据您的需要应用这些。您对ORM的选择应基于其背后的社区和生态系统的活跃程度,而不仅仅取决于其功能集(尽管这是社区的一个因素)。

Additionally, take a look at NHProf , Linq to NH , Nhibernate Search and Nhibernate Validator

另外,看看NHProf,Linq到NH,Nhibernate Search和Nhibernate Validator

#3


If you can afford it IdeaBlade's DevForce is a sophisticated framework that goes beyond an ORM tool. It would be my recommendation for LOB enterprise applications.

如果你能负担得起IdeaBlade的DevForce是一个超越ORM工具的复杂框架。这是我对LOB企业应用程序的建议。

Is a comprehensive platform that enables enterprise .NET development and deployment for n-tier environments. Provides sophisticated object persistence, client-side caching, advanced data binding, business rule validation, support for offline/disconnected operations, and support for publishing and consuming Web Services, among its many features. It also includes the Business Object Server (BOS), an application server that provides scalability, security, and enables n-tier deployment of .NET applications across the internet.

是一个全面的平台,支持n层环境的企业.NET开发和部署。提供复杂的对象持久性,客户端缓存,高级数据绑定,业务规则验证,对脱机/断开连接操作的支持,以及对发布和使用Web服务的支持,以及其众多功能。它还包括业务对象服务器(BOS),这是一种应用程序服务器,可提供可扩展性,安全性,并支持跨Internet的.NET应用程序的n层部署。

#4


LLBLGen Pro is one of the good ones. I am using it in my project and it is doing well. I can not compare other O/R mappers available with LLBLGen pro because I am using O/R Mapper first time. It is not free but I think it is good one to spend money on.

LLBLGen Pro是其中之一。我在我的项目中使用它并且它运行良好。我无法比较LLBLGen pro可用的其他O / R映射器,因为我第一次使用O / R Mapper。这不是免费的,但我认为花钱是件好事。

These links might help.

这些链接可能有帮助。

http://weblogs.asp.net/fbouma/archive/2004/03/06/85125.aspx http://www.llblgen.com/defaultgeneric.aspx

But do tell us which O/R Mapper you choose for your project. This will help us to make decision in future.

但请告诉我们您为项目选择哪种O / R Mapper。这将有助于我们在未来做出决定。

#1


The best thing to use today is still NHibernate. It has been around the longest (see Hibernate for java) and just gets it done. Also, there are many tools out now that make working with it much easier. It blows LINQ to SQL out of the water in terms of features (though not ease of use). The Entity Framework in version 1 is not ready for use. The next version (Entity Framework 4.0) will be much better and may be worth looking at once it is out.

今天最好的用途仍然是NHibernate。它已经存在时间最长(参见Java的Hibernate)并且完成它。此外,现在有许多工具可以更轻松地使用它。它在功能方面使LINQ to SQL脱颖而出(尽管不易使用)。版本1中的实体框架尚未准备好使用。下一个版本(Entity Framework 4.0)会更好,一旦它出来可能值得一看。

#2


I didn't understand the threadsafe part of it.Assuming that you are referring to db access I'd say Nhibernate does this best IMHO(though handling concurrency is fundamental to any ORM).

我不明白它的线程安全部分。假设你指的是db访问我会说Nhibernate做了最好的恕我直言(虽然处理并发是任何ORM的基础)。

Ideally I would want to live in a world where each one gets his turn for the pie. Unfortunately that won’t happen and until then I would try one of these strategies with Nhibernate.

理想情况下,我希望生活在一个每个人都能轮到馅饼的世界里。不幸的是,这不会发生,直到那时我会尝试使用Nhibernate这些策略之一。

Optimistic, Dirty, Versioned or Pessimistic

乐观,肮脏,版本化或悲观

Apply these based on your need.
Your choice of an ORM should be based on how active the community and eco-system behind it is and not just by its feature set(though that's a factor of the community).

根据您的需要应用这些。您对ORM的选择应基于其背后的社区和生态系统的活跃程度,而不仅仅取决于其功能集(尽管这是社区的一个因素)。

Additionally, take a look at NHProf , Linq to NH , Nhibernate Search and Nhibernate Validator

另外,看看NHProf,Linq到NH,Nhibernate Search和Nhibernate Validator

#3


If you can afford it IdeaBlade's DevForce is a sophisticated framework that goes beyond an ORM tool. It would be my recommendation for LOB enterprise applications.

如果你能负担得起IdeaBlade的DevForce是一个超越ORM工具的复杂框架。这是我对LOB企业应用程序的建议。

Is a comprehensive platform that enables enterprise .NET development and deployment for n-tier environments. Provides sophisticated object persistence, client-side caching, advanced data binding, business rule validation, support for offline/disconnected operations, and support for publishing and consuming Web Services, among its many features. It also includes the Business Object Server (BOS), an application server that provides scalability, security, and enables n-tier deployment of .NET applications across the internet.

是一个全面的平台,支持n层环境的企业.NET开发和部署。提供复杂的对象持久性,客户端缓存,高级数据绑定,业务规则验证,对脱机/断开连接操作的支持,以及对发布和使用Web服务的支持,以及其众多功能。它还包括业务对象服务器(BOS),这是一种应用程序服务器,可提供可扩展性,安全性,并支持跨Internet的.NET应用程序的n层部署。

#4


LLBLGen Pro is one of the good ones. I am using it in my project and it is doing well. I can not compare other O/R mappers available with LLBLGen pro because I am using O/R Mapper first time. It is not free but I think it is good one to spend money on.

LLBLGen Pro是其中之一。我在我的项目中使用它并且它运行良好。我无法比较LLBLGen pro可用的其他O / R映射器,因为我第一次使用O / R Mapper。这不是免费的,但我认为花钱是件好事。

These links might help.

这些链接可能有帮助。

http://weblogs.asp.net/fbouma/archive/2004/03/06/85125.aspx http://www.llblgen.com/defaultgeneric.aspx

But do tell us which O/R Mapper you choose for your project. This will help us to make decision in future.

但请告诉我们您为项目选择哪种O / R Mapper。这将有助于我们在未来做出决定。