title: Join list with table in linq
body: <p>I have a problem. I get all data in var type variable and then want to apply a join with database table in code first approach. Facing problem, lot of search on internet and apply but failed.</p>
  
  <pre><code>var joinedData = 
      from menuGroup in _menuGroupMenusRepository.GetAll()
          .Where(x =&gt; x.GroupId == input.GroupId)
      join menus in _menuRepository.GetAll() 
          on menuGroup.MenuId equals menus.Id
      join categSubcateg in _menuCategSubCategRepository.GetAll() 
          on menus.Id equals categSubcateg.MenuId
      join categ in _menuCategoryRepository.GetAll() 
          on categSubcateg.CategoryId equals categ.Id
      select new
      {
          CategoryId = categSubcateg.CategoryId,
          CategoryName = categ.Category,
      };
  </code></pre>
  
  <p>Now I want <code>joinedData</code> variable join with <code>MainMenuSort</code> table.
  MainMenuSort table also have <code>groupid</code> and <code>categoryid</code>.</p>