title: OData 4 Clients and filters with floats
body: <p>We're using the <a href="https://visualstudiogallery.msdn.microsoft.com/9b786c0e-79d1-4a50-89a5-125e57475937" rel="nofollow">OData 4 Client Generator</a> to create some proxy classes and query an OData4 service. Everything seems to work fine, except for queries where we want to filter by properties that are floats or doubles.</p>
  
  <p>So for a given query made with an integer filter:</p>
  
  <pre class="lang-cs prettyprint-override"><code>var ctx = new ODataClient(new Uri("http://..."));
  var intFilter = 3;
  var results = ctx.Entities.Where(e =&gt; e.IntProperty == intFilter).ToList();
  </code></pre>
  
  <p>The resulting query to the service is:</p>
  
  <pre><code>Entities?$filter=IntProperty eq 3
  </code></pre>
  
  <p>And we get the filtered results, as expected.</p>
  
  <p>But if we try to filter with a double value, for instance:</p>
  
  <pre class="lang-cs prettyprint-override"><code>var ctx = new ODataClient(new Uri("http://..."));
  var doubleFilter = 0.35d;
  var results = ctx.Entities.Where(e =&gt; e.DoubleProperty == doubleFilter).ToList();
  </code></pre>
  
  <p>The resulting query ends up being:</p>
  
  <pre><code>Entities?$filter=DoubleProperty eq 0.35
  </code></pre>
  
  <p>When in reality it should be:</p>
  
  <pre><code>Entities?$filter=DoubleProperty eq 0.35d
  </code></pre>
  
  <p>That little difference at the end results in an exception begin thrown by the service: </p>
  
  <pre><code>The query specified in the URI is not valid. 
  Numeric string '0.35' is not a valid Int32/Int64/Double/Decimal.
  </code></pre>
  
  <p>Is there any way to configure these proxy clients to do the conversion correctly? Or are we stuck with the AddQueryOption method and having to build our filter "manually" instead of with LINQ?</p>