Category Archives: NHibernate

NHibernate + XML Columns

One of the things I’ve been working on recently involves using XML columns in SQL Server.  Starting out, it was simple and I was just doing vanilla ADO.NET (wrapped in a simple Query API) combined with XML serialization/deserialization, which worked … Continue reading 


Oxite Review

Several folks, including Microsoft employees and members of the Oxite team, have politely requested I do a post or few on the problems I see with Oxite and why I previously recommended that it is not a good example/sample from … Continue reading 


Mapping A State Pattern With NHibernate

In the comments of my previous post – Descriptive State Enumeration – Maxim Tihobrazov asked me to show how to map a state pattern with NHibernate; and I am more than happy to oblige! NHibernate Mapping Options I certainly don’t … Continue reading 

| Leave a comment

Finding Design Smells In Non-Design Related Places

In my last post, I talked about the idea of encapsulation and using it to ensure that our business rules were enforced correctly. What I didn’t talk about, though, was the second half of the conversation that my coworker and … Continue reading 

Also posted in Uncategorized | 47 Comments

NHibernate Intro Screencast Source

A few folks have asked me recently to post the source/binaries for my recent NHibernate Intro screencasts that are currently up on  So, here they are!   ZIP/Binary download: Source Code Browse: SVN Source Code Checkout: … Continue reading 

| Leave a comment

NHibernate Series

Derik Whittaker and his band of merry video elves over at have posted the 0th of about 5 parts to an NHibernate draft run-through presentation I did with a few of my colleagues. It was part of a presentation … Continue reading 


Integrating StructureMap and NHibernate with WCF

Following many examples I found online for other IoC containers, I borrowed utilized those designs to create a StructureMap instance provider.  One problem we ran into with that design was dealing with NHibernate.  Mainly, there are two types that are … Continue reading 


Converting Columns To a Collection with a Nhibernate UserType

For some of you who have been using Nhibernate for a while, may found this old news, but I thought this was coolest thing ever (at least this week). I am working with a legacy database that is,.. unpleasant (yeah … Continue reading 

Also posted in Uncategorized | 11 Comments

Strategies and discriminators in NHibernate

I recently posted about enumeration classes, and how I like to use them as a sort of “Enumerations with behavior”.  Not every enumeration should be replaced with a class, but that pattern helps quite a bit when I find a … Continue reading 


Parameter lists in NHibernate

Occasionally I need to return a set of entites that match a collection of parameters.  In SQL, I would use the “IN” clause, then manually create each parameter in ADO.NET.  With NHibernate, that’s not necessary anymore.  NHibernate has built-in capabilities … Continue reading