title: I need to get a distinct list based on a column in SQL
body: <pre><code>var sqlStatement = string.Format("select * from CardDecks where deckid = {0}", id);
  var getcardid = db.CardDecks.SqlQuery(sqlStatement).ToList();
  var getDistinct = getcardid.Distinct().ToList();
  </code></pre>
  
  <p>What I expect from this code is for the last list to only pull distinct values but it still pulls duplicates. I need for it to only pull back the list with unique values based on cardid. What am I missing?</p>