title: Distinct not working with LINQ
body: <p>I want to remove repeated rows from a LIST using distinct.</p>
  
  <p>This is the <strong>resultset</strong> (As you can see, index 12 and 14 are repeated)</p>
  
  <pre><code>id  idIndice    idName         idTipo   tamanho     caminho
  12  11          Processo       3        10          C:\Program Files\Empenho\Senha.txt
  13  13          Endereço       1        250         C:\Program Files\Empenho\Senha.txt
  14  12          Número         2        5           C:\Program Files\Empenho\Senha.txt
  15  9           Cep            5        8           C:\Program Files\Empenho\Senha.txt 
  16  10          Dt. de Nasc.   4        0           C:\Program Files\Empenho\Senha.txt
  12  11          Processo       3        10          C:\Program Files\Empenho\Senha.txt
  14  12          Número         2        5           C:\Program Files\Empenho\Senha.txt
  </code></pre>
  
  <p>This is the <strong>sql</strong> I want to archieve (this does the job)</p>
  
  <pre><code>select DISTINCT u.id, u.idIndice, t.idName, t.idTipo, t.tamanho, l.caminho
  from  tgpwebged.dbo.sistema_Indexacao as u
  join  tgpwebged.dbo.sistema_Indexes as t on u.idIndice = t.id
  join  tgpwebged.dbo.sistema_Documentos as l on u.idDocumento = l.id
  join  tgpwebged.dbo.sistema_DocType_Index as v on t.id = v.indexId
  where u.idDocumento = 10 
  </code></pre>
  
  <p>This is the <strong>LINQ</strong> I am trying to adapt</p>
  
  <pre><code>var docObj = from u in context.sistema_Indexacao
  join t in context.sistema_Indexes on u.idIndice equals t.id
  join l in context.sistema_Documentos on u.idDocumento equals l.id
  join v in context.sistema_DocType_Index on t.id equals v.indexId
  join m in context.sistema_DocType on v.docTypeId equals m.id
  where u.idDocumento == id
  select new Gedi.Models.OperacoesModel.getDocIndex
  { ...  };
  </code></pre>
  
  <p>This is what I am trying:</p>
  
  <pre><code>List&lt;Gedi.Models.OperacoesModel.getDocIndex&gt; docIndexModelDup = docObj.ToList();
  List&lt;Gedi.Models.OperacoesModel.getDocIndex&gt; docIndexModel =
  docIndexModelDup.Distinct().ToList();
  </code></pre>
  
  <p>But I still get the same 7 rows as if there is no DISTINCT at all.</p>
  
  <p>Why?</p>