title: NHibernate IList to List
body: <p>Hi I am trying to return a collection of building domain.</p>
  
  <pre><code>private long _id;
  private string _buildingName;
  private IList&lt;BasicRoom&gt; _rooms;
  </code></pre>
  
  <p>I am using NHibernate and this mapping for the rooms</p>
  
  <pre><code>&lt;bag name="rooms" table="tb_rooms" lazy="false"&gt;
  &lt;key column="buildingID"/&gt;
  &lt;one-to-many class="Room"/&gt;
  &lt;/bag&gt;
  </code></pre>
  
  <p>And I am calling the db like this;</p>
  
  <pre><code>Buildings = (List&lt;Building&gt;)session.CreateCriteria(typeof(Building)).AddOrder(Order.Asc("buildingName")).List&lt;Building&gt;();
  </code></pre>
  
  <p>The problem is I don't want the  _rooms collection to be an IList but I need it to be a List. Alas, NHibernate requires that I use an Interface for collections.
  Any idea how to do this. I am new to .Net and thinking that maybe dropping NHibernate might be the way forward. I just need to get the collection typed as an List so I can move on. 
  Any help much appreciated.</p>