Category Archives: NHibernate

Bulk processing with NHibernate

On a recent project, much of the application integration is done through bulk, batch processing.  Lots of FTP shuffling, moving files around, and processing large CSV or XML files.  Everything worked great with our normal NHibernate usage, until recently when … Continue reading 


Implementing Domain Queries

My current Repository interface looks something like this: public interface IRepository { T FindOne<T>(int id); T FindBy<T>(Expression<Func<T, bool>> expression); IEnumerable<T> FindAllBy<T>(Expression<Func<T, bool>> expression); IEnumerable<T> FindAll<T>(); T FindOneBy<T>(Expression<Func<T, bool>> expression); void Save<T>(T target); void Update<T>(T target); void SaveOrUpdate<T>(T target); void Delete<T>(T … Continue reading 

Also posted in Agile | Leave a comment

Migrating to Fluent NHibernate

Recently, I’ve been entrenched in migrating our existing hbm.xml mapping files to Fluent NHibernate.  Having been through other OSS upgrades, I was expecting something along the lines of pulling teeth.  I pictured a branch, tedious work to try and move … Continue reading 


Article series on NHibernate and Fluent NHibernate – Part 3

Today the third part of my series on NHibernate and Fluent NHibernate went live. You can read it here. Summary In part 3 of this article series about NHibernate and Fluent NHibernate I have discussed how to let Fluent NHibernate … Continue reading 

Also posted in ASPdotNET | Leave a comment

Configuring Fluent NHibernate with an External NHibernate Config File

A while ago I was having issues using configuring fluent NHibernate with an external configuration file. I kept running into the issue of mappings not being registered. I was finally able to get it working appropriately and thought I would … Continue reading 

Also posted in Rant | Leave a comment

Some quick updates

I know I’ve been remiss in my blog posting duties. Please trust me when I say it’s for good reason and that you’d understand. I appreciate you sticking with me. In the meantime, here are a few tidbits that you … Continue reading 

Also posted in C# | 7 Comments

Castle ActiveRecord and registering classes at runtime

I use the following trick for adding ActiveRecord classes after the fact for our in-house plug-in architecture.  Thanks to whichever blogger/mailing list I picked this up from so long ago. Scenario 1: Class(es) to load inherit from same base class … Continue reading 

Also posted in Agile | Leave a comment

FluentNHibernate Contrib (FNH.Contrib) Is Alive!

A few months ago, a coworker created a set of extension methods to turn NHibernate’s Criteria API into a more fluenty, strongly typed API. We’ve been using it in a production app for a few months, and I wanted to … Continue reading 

Also posted in Behave# | Leave a comment

What’s been happening in Fluent NHibernate land?

  Fluent NHibernate has seen a flurry of development followed by a complete lack of commits, I figure it’s time to let everyone know what’s going on. The Short Version We’re rewriting the internals. We have 100% of tests passing, … Continue reading 

Also posted in C#, Refactoring | Leave a comment

NHibernate 2nd level cache and multiple databases

Today we had an issue with our system. The application was showing unexpected behavior when different people where working with different databases. The application is a Silverlight based application. What we found out was that although the application was using … Continue reading 

Also posted in TeamBuild, VSTS | Leave a comment