title: How do I conviniently consume OData service from .NET code
body: <p>Is there any best-practice approach/library for consuming OData services from .NET code? So that I do not have to mess with building query string and parse the response manually?</p>
  
  <p>I envision something like this:</p>
  
  <pre><code>class Person
  {
      public string Name {get; set;}
      public int Age {get; set;}
  }
  
  void Main()
  {
      Person person = 
         new ODataRequest&lt;Person&gt;()
             .EndPoint("http://server.com/personservice")
             .AddHeader("header", "value")
             .AsJson()
             .Where(p =&gt; p.Name.EndsWith("y") &amp;&amp; p.Age &gt; 21)
             .Skip(10)
             .Take(5)
             .Send();
  }
  </code></pre>
  
  <p>Please ignore the syntax (and that I'm mixing endpoint related stuff with query related stuff), this is just to convey the idea.</p>
  
  <p>The code above would be supposed to automatically build proper OData query string with $filter, $skip, etc expressions as well as parse the response.</p>
  
  <p>Has a library of this kind been already built? Or I'm on my own here?:)</p>
  
  <p>Thanks!</p>