title: Returning List<int> from Database
body: <p>I have a simple problem that I have not been able to find an answer to despite much Googling. Perhaps posting this question up will help the next poor soul who looks for the same answer.</p>
  
  <p>I have a query that returns a collection of distinct ID's. </p>
  
  <p>I am creating an <code>SQLCommand</code> with this query and using <code>ExecuteScalar( )</code> to run it.</p>
  
  <p><code>ExecuteScalar( )</code> appears to return an object and will not allow me to cast it to List.</p>
  
  <p>What is the best practice to fix this and how can I fix this problem?</p>