Monthly Archives: June 2008


This simple function cleans up a lot of the Alias sillyness I have fought with in NHibernate.         public static ICriteria CriteriaByLongAlias(this ICriteria criteria, string field)         {             ICriteria byAlias = criteria.GetCriteriaByAlias(criteria.Alias + “_” + … Continue reading

Posted in c#, NHibernate | Leave a comment

Cool Code – Assembly.FindType

Here’s an extension to Assembly that I found useful for finding a type. I recommend doing typeof(TypeInAssembly).Assembly.FindType(“typename”);     public static class AssemblyExtensions     {         public static Type FindType(this Assembly assembly, string typename)         {             … Continue reading

Posted in c# | Leave a comment