Castle Contributions
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

C2: Castle Contribution

This repository contains the project C2.Facilities.NH, which is a simple castle windsor facility for NHibernate integration.

Note that there is already a facility in the Castle repository for NHibernate integration, and it is officially supported, so check out that facility to see if it suits your needs better.

The official NHibernate integration facility version 2.0 RC has dependencies on the following assemblies:

  • Castle.Core
  • Castle.Services.Transactions
  • Castle.Windsor
  • NHibernate

If you are able to stay with these older versions, then the official NHibernate integration facility might suit your purposes better that this one.

This facility has dependencies on the following assemblies:

  • Castle.Core
  • Castle.Windsor
  • NHibernate

Why Write another NHibernate integration facility?

I wrote this facility because I needed to upgrade to the latest version of Castle.Windsor to satisfy other dependencies in a project I was working on. This then turned into an attempt to upgrade to the latest version of Castle.Services.Transactions. This assembly has undergone significant revision between 2.5 and 3.0, and the 3.0 version is compiled against version 2.5 of Castle.Core and Castle.Windsor. It all got a bit too hard for me, especially since none of the other code I was using made any use of Castle transactions.

I know it seems like NIH syndrome, but I decided to write my own. At least it helped me to better understand how to write a castle windsor facility. I have made use of code from the official repository, as well as some good ideas from Henrik Feldt's Castle.Facilities.NHibernate facility. Thanks to Henrik and the other Castle project contributors.


There are some instructions at doc/

About the Castle Project

This product incorporates source code from the Castle Project.

More information on the Castle Project can be found at