Creating .In and .NotIn extension methods for NHibernate 3 Linq provider

In Bringing the IN clause from SQL to C# I have shown how to create extension methods for C# that mimic the “in” clause from SQL. I like these methods a lot, but they cannot be used in Linq to NHibernate queries, because it cannot interpret them by default. Luckily, it’s not that hard to … More Creating .In and .NotIn extension methods for NHibernate 3 Linq provider

Mapping custom lists with Fluent NHibernate

NHibernate supports mapping to a few collection types by default, like IList of ISet, but they must be interfaces. To support other types of collections, including concrete classes, you should implement IUserCollectionType inteface. Being lazy as I am, however, I found a way to map custom collections as components using Fluent NHibernate. Here’s how it … More Mapping custom lists with Fluent NHibernate