Category Archives: NHibernate

Why Repository SaveUpdate is a smell

One of the idioms I see a fair amount of is the SaveUpdate method on a Repository. The intent is usually to persist an item to storage, using a SaveUpdate method to lazily avoid the question of whether it is … Continue reading 


What’s New in NHibernate 3? at Calgary .NET User Group Wrap-up

Thanks to everyone who came out to see “What’s New in NHibernate 3?” at the Calgary .NET User Group last night. I had a fun time sharing all the new tidbits available in NHibernate 3 including… .NET Client Profile support … Continue reading 


.NET Client Profile Support in NHibernate 3

[Code for this article is available on GitHub here.] NHibernate 3 introduces support for both the .NET 3.5 Client Profile and .NET 4.0 Client Profile. This means that applications built with NHibernate can be deployed to client desktops without the … Continue reading 


Get/Load Polymorphism in NHibernate 3

[Code for this article is available on GitHub here.] Nothing gets an OO zealot hot under the collar the way the term polymorphism does. You probably have three questions right now… What does polymorphism have to do with object-relational mapping? … Continue reading 

Also posted in AppFabric, WCF | 3 Comments

Date/Time Support in NHibernate

[Code for this article is available on GitHub here.] In this post, we’ll examine the ways that NHibernate supports the DateTime-related data types, including some new features introduced in NHibernate 2 and 3. Here is a quick summary for the … Continue reading 

| 1 Comment

Loquacious Configuration in NHibernate 3

[Code for this article is available on GitHub here.] One of the new features in NHibernate 3 is the addition of a fluent API for configuring NHibernate through code. Fluent NHibernate has provided a fluent configuration API for awhile, but … Continue reading 


Using an NHibernate Formula to aid searching

Executive Summary: Use a formula in an NHibernate mapping to facilitate searching the entire string, “LastName, FirstName”, for a User object. Will see how long this Executive Summary thing lasts. Getting tired of people wasting my time by posting comments … Continue reading 


Austin Code Camp – Introduction to NHibernate and Fluent NHibernate Slide Deck

Sorry for the delay folks…:[*-)] I have uploaded the code sample and slide deck to the repository. You can find the code here. As always, I had a great time in Austin. Look foward to getting back soon!!     … Continue reading 

Also posted in TortoiseSVN | Leave a comment

Heading to Austin Code Camp!

Always a treat to visit Austin, Texas. I’ll be presenting an introduction to NHibernate/Fluent NHibernate this Saturday. If you have never used NHibernate and have wondered how to get started, I hope you will consider attending my session. As always, … Continue reading 

Also posted in ADO.NET Data Services, BDD, SSIS | 1 Comment

OR-ing criteria with NHibernate, or “How to include it all”

Gonna delve away from CodeBetter tradition into more of the realm of our sister site, Devlicious. I.e. This post will be about code, not about thinking about writing code. Having gone through this monstrous exercise though, I gotta say, Ivory … Continue reading