NHibernateIt Released on Sourceforge.Net
NHibernateIt is an NHibernate helper project build on the latest public release of NHibernate 1.20.GA. It provides session management for Web as well as Thread-based Session management, Transaction Management and a repository class with a lot of functionality to use it as a component in your data access layer.
When I was looking on the web for how to integrate NHibernate in an Asp.Net project, I found a lot of stuff on the httpmodules for creating a session helper for the Session-Per-View-Pattern. I stumbled upon a project called NHibernator(http://oracleatdotnet.blogspot.com/2007/04/nhibernator-simple-but-yet-powerful.html), it was not maintained by the original developer and contained too much stuff I really didn’t needed, like for example the NHibernatorTransaction.
Also I didn’t found any solutions for how to use in a commonly used architecture where we have a data access layer, a business layer and perhaps a service layer.
I especially had problems with the session management because I didn’t wanted to use the nhibernate session on the UI layer.
I started out creating a BaseManager for objects that Implemented IDisposable, for ease of use. Now it has become a SessionHelper class with a lot of functionality. A small downside of the Nhibernator Project was the default configuration file naming ‘hibernate.cfg.xml’ which was a security threat when used in a web environment, because you can open xml trough your browser. Yes, you could change it in the web.config file, but as I am a developer who likes to have the entire configuration stored in a database and populated trough a unit test, except for connectionstrings, I love to have web projects without a config file except the default one with for example tracing enabled and such.
Still a lot of credit has to go to Tomer Avissar (author of NHibernator) for starting such a great project.
Well now it's added to SourceForge.Net on http://sourceforge.net/projects/nhibernateit, with full source on svn and simple documentation.