I would like to see your experience with popular ORM tools outhere开发者_JAVA百科, like NHibernate, LLBLGen, EF, S2Q, Genom-e, LightSpeed, DataObjects.NET, OpenAccess, ...
From my exp: - Genom-e is quiet capable of Linq & performance, dev support - EF lacks on some key features like lazy loading, Poco support, pers.ignorance... but in 4.o it may have overcome .. - DataObjects.Net so far good, althrough I found some bugs - NHibernate steep learning curve, no 100% Linq support (like in Genom-e and DataObjects.Net), but very supportive, extensible and mature
http://www.ormbattle.net/
THat is about the best comparison you can find at the moment.
From my experience, btw.: Stay AWAY from NHibernate current release if you have interest in LINQ - use the development branch. The LINQ support mvoes into the main DLL AND - more important - is a lot better and complete than the limited add on methods in the current releases.
- ORM Meter
- Should I ever use Entity Framework 4.0?
- NHibernate – The Good, the Bad, and the Ugly, that it gets!
(source: ormeter.net)
We made a really in-deep analysis two years ago (2010) betweeen NHibernate, EF and Llblgen and chose the last one. We definitely think we made the right decision.
Llblgen Pro is a gorgeous & mature ORM (Entity FW needs to evolve yet: direct m:n, enum, inheritance...). Easy to use both model and database first without XML to see, just a good graphical designer.
- Highly efficient: get only the columns you need ... or use TypedList to get commonly used joined/grouped columns ... or map your views with TypedViews, or map your retrieve Store Procedures ...or use ad-hoc queries. You could even create some templates mapping your own POCO (TypeValue) and call SQL directly!!! (we haven't needed to go so far)
- From the designer, use its own framework, or NHibernate or Entity Framework, or LINQ to SQL
- Quite a lot of functionality you'd miss once you've decided to go into production (prefetch, transactions, databinding helpers, paging, (de)serialization, customization (properties, dependency injection, authorization, auditing, ...)
...but it is much more: a great model designer & template system.
From the ORM on:
- A good use of custom templates (ex. ASP.Net, MVC, REST or WCF) provides a scaffolding system/common architecture -> allows the less experienced coders to catchup and be more productive. Common solutions are reused (its cost drops down: it's not "code vs. understand & integrate" but "code vs. plug"). Although it's old-fashioned ASP.Net webforms have a look at http://northwind.angte-demo.com/ for a feeling of what you can get with the templates.
- Code for your particular application in VS as usual. If the code is reusable add the code to the template (it usually means changing in a ASP-like file things like "Product" with "<%=Entity.Name%>", not hard staff).
精彩评论