grenade
grenade

Reputation: 32169

Repository or dependency injection library for Azure

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!

Upvotes: 3

Views: 1206

Answers (3)

Joannes Vermorel
Joannes Vermorel

Reputation: 9245

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#.

Upvotes: 2

Michael Hart
Michael Hart

Reputation: 5179

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).

Upvotes: 2

gcores
gcores

Reputation: 12656

Apparently NHibernate works with Azure:

NHibernate on the cloud: SQL Azure

Upvotes: 3

Related Questions