title: Linq to Sql: Select distinct rows while ignoring specified columns
body: <p>If I have a query/results set as follows...</p>
  
  <pre><code>from t1 in table1
  join t2 in table2 on t1.ID equals t2.ID
  join t3 in table3 on t2.ID equals t3.ID
  select new MyClass()
  {
     ID = t1.ID,
     Name = t2.Name,
     Rank = t2.Rank,
     City = t3.City
  }
  
  ID | Name | City | Rank
  01 | Test | Fake | 876
  01 | Test | Fake | 755
  02 | Blah | Fake | 765
  </code></pre>
  
  <p>Doing a .Distinct() will return all 3 records, but what if I want the first and third record and don't want to eliminate any columns from my results set? Is there a way to specify columns to ignore when doing a distinct, or explicitly include in a distinct so that I could do something like this...</p>
  
  <pre><code>// pseudo code
  .Distinct(o =&gt; o.Name.FirstOrDefault())
  </code></pre>
  
  <p>I think it's possible to do this using group by, but that seems like it would be slow and messy, especially if I needed to group on multiple columns in order to not exclude too many rows. Any ideas? Thanks.</p>