title: NHibernate: How to return list of scalar values (from one column) using CreateSQLQuery?
body: <p>What is the best/cleanest method of calling a native SQL returning a list of scalar values (ints in my case) having ISession object?</p>
  
  <p>I am trying to run the following but I am always getting some errors:</p>
  
  <pre><code>var query = _session.CreateSQLQuery("SELECT Id FROM SomeTable");
  
  A. var ids = query.List&lt;int&gt;(); // &lt;-- throws ArgumentNullException "Value cannot be null.\r\nParameter name: item"
  B. var ids = query.List(); returns one element array with no valid information.
  C. query.SetResultTransformer(NHibernate.Transform.Transformers.AliasToBean&lt;int&gt;());
  var ids = query.List&lt;int&gt;(); // throws PropertyNotFoundException: "Could not find a setter for property 'Id' in class 'System.Int32'"
  </code></pre>
  
  <p>Is there a way to retrieve a list of ints without creating an entity class containing just one int property named Id?</p>