title: OData : filters with select provide inconsistent results
body: <p>I have following structure.</p>
  
  <pre><code>Product
  {
      GUID ID
      string Name
      GUID Category
      decimal Cost
      bool IsActive
  }
  </code></pre>
  
  <p>In my configuration I have registered ID as a primary key.
  I am trying to create a simple Get endpoint that retrieves all the data from Products.
  The endpoint in itself works as expected in most cases.</p>
  
  <hr>
  
  <ul>
  <li>Works - /Products</li>
  <li><p>Works - /Products/?$filter=IsActive eq true</p></li>
  <li><p>Works - /Products/?$filter=ID eq {some guid}</p></li>
  </ul>
  
  <hr>
  
  <p>While above is a fairly straight forward and works as expected, when i try to mix filters with select it seems to provide inconsistent results.</p>
  
  <ul>
  <li>Valid Results - /Products/?$filter=IsActive eq true and ID eq {some
  guid}&amp;$select=Name,IsActive</li>
  <li><strong>Empty Results</strong> - /Products/?$filter=IsActive eq true and ID eq {some
  guid}&amp;$select=Name</li>
  <li><strong>Empty Results</strong> - /Products/?$filter=ID eq {some guid} and IsActive eq
  true&amp;$select=Name</li>
  </ul>
  
  <hr>
  
  <ul>
  <li>Valid Results - /Products/?$filter=IsActive eq true&amp;$select=Name,IsActive</li>
  <li><strong>Empty Results</strong> - /Products/?$filter=IsActive eq true&amp;$select=Name</li>
  <li><strong>Empty Results</strong> - /Products/?$filter=IsActive eq true and Cost ne null&amp;$select=IsActive</li>
  </ul>
  
  <hr>
  
  <p>In Case of 'or' I have found below results. Please note none of the values are null in my test data set.</p>
  
  <ul>
  <li>Valid Results - /Products/?$filter=Category ne null or Name eq 'Test Product'&amp;$select=Cost,Name</li>
  <li>Valid Results - /Products/?$filter=Category eq null or Name eq 'Test Product'&amp;$select=Cost (I had removed category from some of the data)</li>
  <li><strong>Empty Results</strong> - /Products/?$filter=Category ne null or Name ne 'Test Product'&amp;$select=Cost,Name</li>
  <li><strong>Empty Results</strong> - /Products/?$filter=Category ne null or Name eq 'Test Product'&amp;$select=Cost</li>
  </ul>
  
  <hr>
  
  <p>Please note, I have written my own SQL and I have already verified that this generates proper dataset as expected, but oData seems to be doing some processing on the response object.
  When I say doesn't work, I mean it just returns me an empty collection instead of giving me relevant values.</p>
  
  <p>For my setup I am using oData V4 with all the latest dependencies.</p>
  
  <p>Microsoft.ASPNet.OData - 6.1.0</p>
  
  <p>Microsoft.Data.Edm/Core/Spatial - 7.4.3</p>
  
  <p>Can someone please explain why the filter above behaves in such different ways?</p>
  
  <p><strong>Additional Details</strong></p>
  
  <p>When I looked at my response object that I return, it contains 20 odd elements.</p>
  
  <pre><code>OK(response)
  </code></pre>
  
  <p>I have created an attribute that overrides OnActionExecuted where context.Response.Content is null, instead of containing those 20 elements.</p>
  
  <p><strong>Metadata</strong></p>
  
  <pre><code>&lt;EntityType Name="Products"&gt;
      &lt;Key&gt;
          &lt;PropertyRef Name="ID" /&gt;
      &lt;/Key&gt;
      &lt;Property Name="ID" Type="Edm.Guid" Nullable="false" /&gt;
      &lt;Property Name="Name" Type="Edm.String" /&gt;
      &lt;Property Name="IsActive" Type="Edm.Boolean" /&gt;
      &lt;Property Name="Category" Type="Edm.Guid" /&gt;
      &lt;Property Name="Cost" Type="Edm.Decimal" /&gt;
  &lt;/EntityType&gt;
  </code></pre>