title: Trying to traverse tables from sql database using entity framework targeting .net 3.5 websites
body: <p>I'm simply trying to get data from two sql server db tables using ado.net entity framework.  My code is: </p>
  
  <pre><code>    using (Model.Entities e = new Model.Entities())
      { 
         return e.PAGE.First().CONTROL;
      }
  </code></pre>
  
  <p>The database is setup to have two tables, a control table which links to a page table via an 'id' field in the tables (control_id).  There is one CONTROL object for each PAGE object.</p>
  
  <p>I keep getting a null value for my return value and I know that's not right.  </p>
  
  <p>I can use vis studio and breakpoints to see that there is a PAGE object in 'e' and I can see that there are multiple CONTROL objects in 'e'.  This isn't a large database, I just have some sample data in there to ensure that I get this working - so I know that there should be a CONTROL object connected to this PAGE (i've verified this through sql server).</p>
  
  <p>I am very familiar with the general code syntax, I've been using LINQ for a couple of years; however, I have not done much work at all with the entity framework or ado.net 4. </p>
  
  <p>It seems like if I just pull individual table data then it works fine (i.e. e.PAGE.First()  .. or ..  e.CONTROL.Where(x=>x.someValue.Equals('someValue') ) but if I try to pull by traversing through the tables then I get nothing back (NULL).</p>
  
  <p>Hope that all makes sense.</p>