title: Select All distinct values in a column using LINQ
body: <p>I created a Web Api in VS 2012.
  I am trying to get all the value from one column "Category", that is all the unique value, I don't want the list to be returned with duplicates.</p>
  
  <p>I used this code to get products in a particular category. How do I get a full list of categories (All the unique values in the Category Column)?</p>
  
  <pre><code>public IEnumerable&lt;Product&gt; GetProductsByCategory(string category)
      {
          return repository.GetAllProducts().Where(
              p =&gt; string.Equals(p.Category, category, StringComparison.OrdinalIgnoreCase));
      }
  </code></pre>