title: Getting distinct items for a list of address objects from stored procedure
body: <p>So I am trying to get unique addresses only from my list but for some reason the .Distinct is not working</p>
  
  <p>I tried  :</p>
  
  <pre><code> List&lt;Address&gt; addresses = _db.Database.SqlQuery&lt;Address&gt;(
   "GetSampleAddresses @workflow_id, @records ", param1, param2).Distinct().ToList();
  </code></pre>
  
  <p>And </p>
  
  <pre><code> var json = new JavaScriptSerializer().Serialize(addresses.Distinct());
  </code></pre>
  
  <p>But neither removes the duplicates, any idea why ?</p>