title: LINQ joins and ADO.NET Data Services
body: <p>I have a Windows Service which exposes three sources of data via ADO.NET Data Services. These sources of data are read only XML files loaded into an XDocument and then exposed via .AsQueryable(); The sources contain fields with integer IDs which can be considered to be 'foreign keys' between the data sources.</p>
  
  <p>My client consumes this data service and can query the three sources of data individually with LINQ. There are databound controls which use the data.</p>
  
  <p>On the client, I'd like to to a SQL-style join between these three sources of data. I originally did this with a LINQ join but discovered that ADO.NET Data Services doesn't support this.</p>
  
  <p>My second approach was to fetch the data as separate tables and then perform the join client side - despite this being less than optimal. However, as LINQ fetches data lazily and constructs the query when the data is enumerated this ultimately results in the same problem as the first approach.</p>
  
  <p>So, I'm now thinking the best way to do this is to join all my data on the server side and expose this using a new object with provides the IQueryable interface. </p>
  
  <p>Is this really the best approach? It seems .... untidy.</p>