Announcing NHibernate.SqlAzure version 1.0!

I’m proud to be able to announce the release of version 1.0 of NHibernate.SqlAzure!

This library takes care of retrying when the transient errors that SQL Azure throws at you occur while using the NHibernate ORM. It’s been in Beta for the last few months and has been successfully used on a number of production websites.

Changes from 0.9 to 1.0

  • Bug fix when using Schema validation (thanks to @hmvs)
  • There is now a transient error detection strategy and associated NHibernate driver (SqlAzureClientDriverWithTimeoutRetries; say that 10 times fast!!) that retries for timeout exceptions (see the Github page for details and also thanks to @hmvs for a contribution towards this)
  • Some instances where exceptions were wrapped in NHibernate exceptions (batching, transactions) are now picked up as transient exceptions when before they were ignored
  • You can now easily log connection and command exceptions separately (see the CommandRetry and ConnectionRetry virtual methods on the driver class you use)
  • The documentation is a bit more comprehensive now
  • I finished writing all the automated tests I wanted to
  • Been road-tested on a number of sites over the last few months in production

This project is a collaborative effort along with my partner in code crime – Matt Davies – all code was either pair programmed together or reviewed by the other party.

Go and grab it from NuGet today and let me know how you go! Installation / usage instructions are on the Github page.

3 Replies to “Announcing NHibernate.SqlAzure version 1.0!”

  1. Hi,
    thanks for your update. But I really don’t where to starting using this version for SQL Azure. I am currently using NHibernate successfully in my C# MVC4 app for local database but need to use my sql azure db. What do I need to do different from changing connection string and dialect.

    Thanks for your kind response.


    1. Hi Donald,

      All you need to do is follow the instructions at:

      In short (assuming you are using an NHibernate config file – if you are using Fluent NHibernate there are separate instructions):

      1. Install the NHibernate.SqlAzure package from NuGet
      2. Set connection.driver_class to NHibernate.SqlAzure.SqlAzureClientDriver, NHibernate.SqlAzure

      And that’s it. There are further instructions if you want to have reliable transactions and to retry for timeout exceptions – just check out the link 🙂

      Let me know how you go!

Leave a Reply

Your email address will not be published. Required fields are marked *