title: C# NHibernate QueryOver select multiple Properties
body: <p>In my C# application I use NHibernate to get all rooms from my database table 'room'.</p>
  
  <pre><code>using (ISession pSession = NHibernateHelper.OpenSession())
              {
                  IList&lt;Room&gt; roomList = pSession.QueryOver&lt;Room&gt;().
                                                  Where(x =&gt; x.FloorID == 3).
                                                  .List();
              }
  </code></pre>
  
  <p>The table 'room' and also my Mapping class (Room.cs) contains  lets say the following properties:</p>
  
  <pre><code>roomID
  hash
  date
  identifier
  </code></pre>
  
  <p>I have a DataGridView which should display my table entries from the database: the code is:</p>
  
  <pre><code> roomDataGridView.DataSource = roomList;
  </code></pre>
  
  <p>That works fine so far. But now I decide that I dont want to show all the properties from the Room class, I only want to display </p>
  
  <pre><code>roomID
  identifier
  </code></pre>
  
  <p>I tried the following:</p>
  
  <pre><code>roomDataGridView.DataSource = listOfRoomPropertiesForCurrentFloor.Select(x =&gt; new {x.Identifier, x.RoomID });
  </code></pre>
  
  <p>Unfortunately this does not work...nothing gets printed in my DataGridView.</p>
  
  <p>Question: How can I store all properties from the room table in my room model BUT ONLY show TWO of the four properties in the DataGridView?</p>