Tutorial :Which ORM tool should I use for .Net development [closed]



Question:

My company is looking to use an ORM for new development in .Net. We are currently looking at nHibernate, because of its popularity, however LLBLGen is another option that we may consider. Cost is not a primary factor. We need a solution that provides good separation of the domain model from the database, a good caching strategy, development productivity (i.e. if I can edit it in a GUI instead of config files, great), good customer support.

I know that nHibernate is very popular, but I also know that the price (it's free) may be part of that reason for open source types. Since cost isn't a primary factor (unless the price is > $10,000), which would you choose given our circumstances? Also, what other factors, other than ones that I've listed, would you consider most important in choosing an ORM?

Resolution

We finally decided upon NHibernate as a solution, however in hindsight, I think I would have gone with LL if we had it to do over again. I'm just not found of the xml mapping files. The code generators that I found for NHibernate left a lot to be desired. I do find Fluent NHibernate to be an interesting development, but I'd rather wait for it to mature first before using it.

As it turned out, the most important part of my learning process turned out not to be the technologies, but two design patterns: the repository and separated interface patterns. By defining a repository interface for data access (Jeffrey Palermo has a number of blog posts on this and both the Apress and Wrox MVC books show this as well), we can use LinqtoSQL, LLBLGen, NHibernate, etc. and swap out the DAL implementation later if we switch. So while one of my co-workers is using NHibernate on his app, I chose to use LinqToSQL on my most recent app and it worked just fine.


Solution:1

If you don't mind paying, I would suggest LLBLGen.

Full list of features here.

From the site:

True database independent code

Full entity type inheritance

Linq support

Typed lists and Typed views

Stored procedures support

Flexible concurrency mechanism

Fine-grained validation framework

Derived table support


Solution:2

Check out DataObjects.Net (GPL + commercial).


Solution:3

I suggest you look at the various similar questions first, e.g: https://stackoverflow.com/questions/380620/what-object-mapper-solution-would-you-recommend-for-net


Solution:4

I've been using LlblGenPro since 2003. It is a great product, reasonably priced, wonderfull support through the solutions design website. Frans (the main developer) issues patches as needed and new full installs frequently, so that clients who are experiencing issues can take advantage of fixes quickly.

The current version supports Linq along with its traditional access infrastructure. Version 3 is in development, but probably won't be released until 2010.

LlbGen starts by reading your current database schema(s) which may save time in developing the db to object mapping compared to nHibernate.

There are things I'd like improved with LlblGen, but I'm a very happy long time user and their support can't be beat.


Solution:5

It depends a bit on what you want:

  • Do you want to create your own Domain classes, which you do not have to inherit from some by the ORM defined base class or interface, then NHibernate is the preferred solution.

  • Do you want to auto-generate entity-classes based on your database-model, then you should go for LLBLGen.


Solution:6

Another vote for LLBLGEN, couldn't live without it!


Solution:7

We use nHibernate a lot. so far so good.


Solution:8

SignumFramework has a full LINQ Provider, and it's based on entitiy-driven approach. The other side is that it's fine just for new developments (not for existing databases).


Solution:9

If you start from scratch you can use NHiberbate which has a solid background too. But, we are using LLBLGen Pro in more than one project, and it is very solid and orthogonal. It has a very good documentation too. NHibernate has a big community (if we add Hibernate too) but LLBLGen is a very mature product, very helpful forum, and very good documentation.

What is the RDMS to be used? We are using LLBLGen Pro with Oracle, and it absolutely separates database specific and generic operations without problems. It has avoided Inner Platform Effect perfectly. (Think about Oracle sequences and SQL Server Identity fields for example. It is not a problem with LLBLGen Pro.)

LLBLGen Pro is a very extensive code generator. It maps objects in the database to a database access layer as a project(s) that can easily be added to your solution. This has a very good advantage that can not be though of at the first sight : If a stored procedure or even a field changes/removed, you will notice the error at compile time, not run time. So, if you already have a running database, go with LLBLGen Pro.

You can also add its data source components to Visual Studio if you are a drag-and-drop guy and easily bind the data. Some people find it useful for ASP.NET projects.

One more important thing : Typed Lists : These are very useful to create data sources without changing any code in the database. So, if you have some grids displaying data, you can provide data without touching to database which becomes very safe in critical environments.

So, I would suggest LLBLGen Pro even though N/Hibernate has more users.


Solution:10

For small projects I used Sooda but that was about year ago. Now only and definitely NHibernate.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »