title: Is there an easier way to create a WCF/OData Data Service Query Provider?
body: <p>I have a simple little data model resembling the following:</p>
  
  <p><strong>InventoryContext</strong>
  {</p>
  
  <p><code>IEnumerable&lt;Computer&gt; GetComputers()</code></p>
  
  <p><code>IEnumerable&lt;Printer&gt; GetPrinters()</code></p>
  
  <p>}</p>
  
  <p><strong>Computer</strong>
  {</p>
  
  <p><code>public string ComputerName { get; set; }</code></p>
  
  <p><code>public string Location { get; set; }</code>
  }</p>
  
  <p><strong>Printer</strong>
  {</p>
  
  <p><code>public string PrinterName { get; set; }</code></p>
  
  <p><code>public string Location { get; set; }</code></p>
  
  <p>}</p>
  
  <p>The results come from a non-SQL source, so this data does not come from Entity Framework connected up to a database.</p>
  
  <p>Now I want to expose the data through a WCF OData service. The only way I've found to do that thus far is creating my own Data Service Query Provider, per this blog tutorial:</p>
  
  <p><a href="http://blogs.msdn.com/alexj/archive/2010/01/04/creating-a-data-service-provider-part-1-intro.aspx" rel="nofollow noreferrer">http://blogs.msdn.com/alexj/archive/2010/01/04/creating-a-data-service-provider-part-1-intro.aspx</a></p>
  
  <p>... which is great, but seems like a pretty involved undertaking. The code for the provider would be 4 times longer than my whole data model to generate all of the resource sets and property definitions.</p>
  
  <p>Is there something like a generic provider in between Entity Framework and writing your own data source from zero? Maybe some way to build an object data source or something, so that the magical WCF unicorns can pick up my data and ride off into the sunset without having to explicitly code the provider?</p>