title: LINQ Distinct()
body: <p>I am working on getting the results of this sql query in LINQ</p>
  
  <pre><code>SELECT DISTINCT(Type)
  FROM  Product
  WHERE categoryID = @catID
  </code></pre>
  
  <p><strong>this is my repository query:</strong>   </p>
  
  <pre><code>public IQueryable&lt;ProdInfo&gt; GetProdInfo()
          {
  
              var data = from u in db.Prod
                         select new ProdInfo
                         {
                             PID = u.PID,
                             CatID = u.CatID,                           
                             LastChanged = u.LastChanged,
                             ChangedBy = u.ChangedBy,                               
                             Type = u.Type,
                         };
  
              return data;
          }
  </code></pre>
  
  <p><strong>filter:</strong></p>
  
  <pre><code>public static IQueryable&lt;ProdInfo&gt; GetDistinctProdType(this IQueryable&lt;ProdInfo&gt; qry,int CatID)
              {
                  return from p in qry
                         where p.CatID.Equals(CatID)
                         select p;
              }
  </code></pre>
  
  <p>I need the filter to return the distinct prod type? How can i do this?</p>