views:

164

answers:

3

Can anyone point me at a decent repository or dependency injection library for any of the variations of Azure data services?

I'm looking for quicker ways to bring applications to market and would like a library that allows (even more) minimal coding to persist and retrieve entities to the cloud.

Preferably libraries that provide source access in C#.

Cheers!

+2  A: 

Apparently NHibernate works with Azure:

NHibernate on the cloud: SQL Azure

gcores
that's awesome!
grenade
+1  A: 

SQL Azure is the way to go if you're planning on sticking with an RDBMS (and you should be able to use any existing RDBMS repository implementation for this).

However, if you want to use the more scalable Table Storage, then you might want to look into CloudStorage.API, which provides a wrapper around this (it purports to aim for other cloud storage endpoints too, but AFAICT it's quite Azure specific). It will also enable better unit testing and dependency injection than the provided implementation in the Azure samples.

You'll have a Unit Of Work interface to work with with IEntityTableDataContext and then creating your own Repository implementation on top of this shouldn't require much effort.

The main thing you'll need to be aware of is the restrictions that the Table Storage imposes on your entities - they basically need to be very simple property-exposing classes. For a richer domain model, you may want to explore mapping these data entities to your domain entities (you could use AutoMapper to assist you here too).

Michael Hart
+2  A: 

You can check Lokad.Cloud - a O/C mapper (object to cloud) designed for Azure. In particular, we provide a built-in support for IoC through autofac. Source is available in C#.

Joannes Vermorel