Variable naming, taken too far...
At least it is not a comment, but still...
        object countMayBe_Int32_Or_Int64_DependingOnDatabase = executableCriteria.UniqueResult();
        return Convert.ToInt64(countMayBe_Int32_Or_Int64_DependingOnDatabase);        
Oh well, at least it is refactored :-)
 

Comments
Is this a patch for the NHRepository<T>.Exists() method? I experienced an unboxing problem similar to what you describe yesterday. I have written a patch for the method which is similar to your example.
Yes, precisely.
Comment preview