title: Applying Distinct to OData query
body: <p>I want to get a list of distinct values from my OData endpoint. But distinct or group by isn't supported yet.</p>
  
  <p>My URI query looks something like this</p>
  
  <pre><code>GET /odata/Products?$select=foo &amp; $top=10 &amp; $count=true &amp; distinct=true
  </code></pre>
  
  <p>My Controller</p>
  
  <pre><code>[EnableQuery]
  public IQueryable&lt;FooBarBaz&gt; Get(ODataQueryOptions&lt;FooBarBaz&gt; queryOptions, bool distinct)
  {
          //I've tried the following
          return Repository.AsQueryable().Distinct();
  
          // and
          return Repository.AsQueryable().GroupBy(x =&gt; x.Foo);
  
          // and
          IQueryable query = queryOptions.ApplyTo(Repository.AsQueryable());
          return query.Distinct(); // Can't call .Distinct() here
  }
  </code></pre>
  
  <p>None work :(</p>