views:

333

answers:

6

Just wondering what everyones thoughts on what ORM to use for SQL Azure?

I'm fairly comfortable using LINQ-to-SQL and I believe it is possible to get it working with SQL Azure. However, from my understanding (correct me if I'm wrong), no further improvements will be made to Linq-to-SQL in future releases of the .NET framework?

Alternatively, there is the entity framework... and further afield from the Microsoft Camp is NHibernate.

Ideally, any additional suggestions made should be free or open source. I have seen Telerik's ORM but this of course, is a commercial product.

I can get the definitions/benefits of each ORM myself by doing a Google search, but I was just interested in peoples opinions as to which ORM seems to work best for them (even if it is none of the above).

+1  A: 

Check out NHibernate. Probably top of the line right now.

Otherwise a good resource is always http://www.ormbattle.net/

TomTom
It's just a big `DataObjects.Net` ad. :)
Arnis L.
For what it's worth Lokad.Translate is a humble app build for Azure with NHibernate, see http://code.google.com/p/lokad-translate/
Joannes Vermorel
+1  A: 

I use Linq-to-SQL with my SQL Azure database. I have a simple one-to-one model between my classes and database tables so it's the simplest solution and works prefectly (a few SQL Azure glitches aside).

The Entity Framework vs LINQ to SQL question will answer that one for you.

sipwiz
+3  A: 

We're using NHibernate on Azure at the moment and are finding it pretty good.

Because we're using s#arp architecture to provide the majority of the plumbing code for NHibernate and Dependency Injection we've managing to get projects fired up pretty quickly with a good solid foundation. All told it's been pretty painless but there can be a bit of a steep learning curve with NHibernate when you first start.

I'm not sure if you're aware of Fluent NHibnerate - http://fluentnhibernate.org - but it's a great tool and will automatically map your business objects onto your database. It can of course be customised to whatever behaviour you need.

AndyM
+5  A: 

DataObjects.Net supports SQL Azure. It's available under GPL (but not LGPL - i.e. if GPL is too strict for you, you must acquire a commercial license).

Alex Yakunin
I've not come across this one before, many thanks for the heads up!
Jamie Chapman
+1  A: 

Hi Jamie,

I've been using Entity Framework 1.0 fairly successfully, and I'm pretty sure 4.0 will be even better, particularly with it's support for POCOs (so you're free from context related objects from the beginning). Either version, the LINQ support does make a huge difference once you get the hang of it.

But I would say that you should regard any ORM as just an option - if you set up your data access layer to use the Unit of Work and Repository patterns, then use your favourite Inversion of Control container to inject the particular implentation, then you gain yourself a bit more work setting up, but a lot more long term freedom. Who really cares where the data is or how you're getting it past a certain level, it's what you do with it that counts

that's what I reckon ...

Toby

TobyEvans
Agree on 4.0 being better than the 1.0 framework - sadly, it is not "even better" but "idioic stupid" instead of "worst framework ever". Please, have a look at the features of GOOD ORM's before liking enttiy framework. You miss out the world.
TomTom
+1  A: 

Jamie,

Like Toby I have been using the EF with success. I highly recommend it. Note that as I post this I had to generate the Model from a local version of our schema. This is not a bid deal, but is worth mentioning. Expect this to change in the future.

Ian

Ian