title: Linq to sql Distinct after join
body: <p>I have a join query and i want to filter the result of this query by using distinct. I want to get only one of the shoes which has same brand, model, primary color and secondary color. How can i make this ? Here is my join query.</p>
  
  <pre><code>var query = from b in db.BrandTbls.AsQueryable()
              join m in db.ShoeModelTbls on b.BrandID equals m.BrandID
              join s in db.ShoeTbls on m.ModelID equals s.ModelID
              join i in db.ShoeImageTbls on s.ShoeID equals i.ShoeID
              where s.Quantity &gt; 0
              orderby m.ModelName
              select new 
              { 
                  s.ShoeID, 
                  m.ModelName, 
                  m.Price, 
                  b.BrandName, 
                  i.ImagePath
              };
  </code></pre>