Maybe I should be a little clearer in my question. Sergey gave a solution in the post I referenced previously which was this:
Code:
IQuery query = session.GetNamedQuery("...").SetResultTransformer(Transformers.AliasToBean(typeof(Company)));
However, I do not have a SetResultTransformer method available if I copy this code in my project. Having downloaded the NHibernate source, when I look in the IQuery interface, there is no SetResultTransformer method.
This looks like exactly the solution I need, but I am unable to try it because it is not available! I am pretty confused as it has been directly referenced by Sergey and in the post I linked to the author was obviously able to use it!!
Cheers, Ben