title: LINQ help for a beginner selecting multiple tables
body: <p>I have the following repository that includes three methods for returning my db objects, the first two queries work fine as they simly return one list of data, however as the thrird method requires a selection from both tables im a bit confused with how to do this.</p>
  
  <p>Can anyone kindly point me in the right direction as how to write a LINQ query to select from two related tables to pass into the last method (CustomerAndSites) in the repository shown below - the tables are related on a customer ID field, </p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using CustomerDatabase.Domain.Abstract;
  using CustomerDatabase.Domain.Concrete;
  using CustomerDatabase.Domain.Entities;
  using System.Data.Linq.Mapping;
  using System.Data.Linq;
  using System.Web.Mvc;
  
  namespace CustomerDatabase.Domain.Concrete
  {
   class SqlCustomersAndSitesRepository : ICustomersAndSitesRepository
  {
      public Table&lt;CustomerSite&gt; customerSitesTable;
      public Table&lt;Customer&gt; customerTable;                              
  
  
      public SqlCustomersAndSitesRepository(string connectionString)
      {
          customerSitesTable = (new  DataContext(connectionString)).GetTable&lt;CustomerSite&gt;();
          customerTable = (new DataContext(connectionString)).GetTable&lt;Customer&gt;();
      }
  
      public IQueryable&lt;CustomerSite&gt; CustomerSites
      {
          get { return customerSitesTable; }
      }
  
      public IQueryable&lt;Customer&gt; Customers
      {
          get { return customerTable; }
      }
  
      public IQueryable &lt;ICustomersAndSitesRepository&gt; CustomerAndSites
      {
          get { return CustomerAndSites; }
      }
  
  }
  </code></pre>
  
  <p>}</p>
  
  <p>====Update</p>
  
  <p>This is my ICustomersAndSitesM interface, where do i define the CustomersAndSitesMix, do i need to create that as a seperate entity? i have a view model in my UI project that contains the properties for both objects. </p>
  
  <p>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using CustomerDatabase.Domain.Entities;</p>
  
  <p>namespace CustomerDatabase.Domain.Abstract
  {
      interface ICustomersAndSitesM
      {
          IQueryable Customers { get; }
          IQueryable CustomerSites { get; }
      }</p>
  
  <p>}</p>