title: NHibernate, accessing data from a stored procedure that has multiple result sets
body: <p>I have working code that looks something like this:</p>
  
  <pre><code>var query = CreateSqlQuery("exec spMyStoredProcedure");
  query.SetResultTransformer(Transformers.AliasToBean(typeof(MyMappedObjectDTO)));
  return query.List&lt;MyMappedObjectDTO&gt;();
  </code></pre>
  
  <p>With my stored procedure looking something like this:</p>
  
  <pre><code>SELECT * FROM @myTable1
  </code></pre>
  
  <p>This works fine. However, I want to (in my stored procedure) add another data set by putting in an additional select statement so that my SP would look something like this:</p>
  
  <pre><code>SELECT * FROM @myTable1
  SELECT * FROM @myTable2
  </code></pre>
  
  <p>However, when I run my code, it only returns the data from the first select statement. How can I access both data sets with the resulting ISQLQuery??</p>
  
  <p>Thanks in advance!</p>