title: Converting Linq Expression to C# EF
body: <p>I have been at this two days now. I am not very good at Linq expressions so please forgive the simplicity. I have two related tables and writing a join in TSQL would be easy but I am using Entity Framework and Linq.</p>
  
  <p>I hacked out a query in LINQPad (via reading articles and tutorials) and it is returning the results as I want finally.</p>
  
  <p>Now I need help turning that into C# code. I have google for translator site and find plenty of SQL to Linq but none for what I am doing....quite possibly because I don't even know that I am using the correct search terms.</p>
  
  <p>My LINQPad code is this:</p>
  
  <pre><code>DashboardNavigations
  .OrderBy(x =&gt; x.Id)
  .Select(x =&gt; new 
  {
      x.Id,
      x.Name,
      x.Description,
      x.ImageUrl,
      SubDash = SubDashNavs 
          .Where(s =&gt; s.DashId == x.Id)
          .Select(y =&gt; new { y.Id, y.Name, y.Description })
  
  })
  </code></pre>
  
  <p>I am used to writing SIMPLE Linq expressions to entity framework like this:</p>
  
  <pre><code>var query = _mlsDashboardNavRepository.Table;
  query = query.OrderBy(c =&gt; c.Id);
  var dashnav = query.ToList();
  </code></pre>
  
  <p>As you can see I have the main records returning but cant get the join right.</p>
  
  <p>What i am needing help with is translating the code from LINQPad to C# / EF / LINQ to SQL....????</p>