Alex Rivera | Logout

Easiest to learn and use .NET ORM framework?

Asked 2009-02-17T17:50:52.503
11

Note: Anyone coming to this question now, mind the date. This question is nearly 4 years old and the information is relatively outdated. In my experience NHibernate now is relatively easy to use (with the fluent interface), Entity Framework is a legitimate contender, and MicroORMS such as Dapper and Massive are becoming quite popular.


We are re-writing one of our core web applications and I finally got the all clear from management to replace the horrible tangle of stored procedures with an ORM framework for implementing our data access layer.

Hooray for me. Now I have to choose one.

I have played around a little bit with the following

Now I know that NHibernate is the true Alt.Netty choice but the problem is that I am working with contractors who as far as I know have never heard of it, and NHibernate has a reputation for quite a learning curve. Subsonic in the meantime seems like a far more straightforward approach. I also am aware of the Entities Framework but am wary of its 'meh' reception and Linq to Oracle but am wary of the fact that I've hardly heard anything about it.

So the questions are:

  1. Are there any more frameworks I should be considering?
  2. Which do you recommend for my situation?

Some more considerations:

  • When I say I have a played around a bit with these frameworks, I mean it. I have configured them and used them to pull in some data to make sure it all works. That's t
Edit
Report

2 Answers

3

Checkout XmlDataMapper a simple free ORM (LGPL Licence) which leaves a low memory footprint compared to the other giants. The sample project provided should be good enough to get started.

To integrate XmlDataMapper all you need to do is 4 little steps

  1. Create a Business Entity / DTO for the tables
  2. Create an XML File with the mapping information between the table and the DTO.
  3. Specify the DTO and xml file in the configuration.
  4. Just call the DTOConverter.Convert(dataReader) and other such methods to convert your database record to DTO / Business Entity
answered 2010-02-06T12:53:10.603
1

Well the issue when considering an ORM is

  • finding good information about it. Examples, Learning materials.
  • do enough people use it (is the product mature)? the more companies use it the more likely the bugs have been found.

When I look at the ORM market for .Net I am finding more and more material on NHibernate

Links to helpful material about Nhibernate <- Videos, tools, and best practices

Castle is built ontop of NHibernate (It is using the Active Record pattern)

Have a google to see if the ORM;s have any tools which help you develop faster.

  • Telerick says it comes with VS intergration
  • Nhibernate has a couple of tools to reverse engineer a DB into classes, also there is NHProf (not free) which monitors the SQL between NH and SQL

if you are not into XML mapping files, see if you can find a Fleunt mappings. Which should mean compile time checking (some people find this to be easier to debug/refactor code)

fluent nhibernate

HTH

Bones

answered 2009-02-17T18:57:47.957

Your Answer