title: How to select with linq to entity Categories and SubCategories?
body: <p>Here is the structure of my Categories table</p>
  
  <pre><code>Categories Table
  --------------------------------
  ID      Name      ParentID
  
  1       NameOne    NULL
  2       NameTwo    1
  3       NameThree  1
  4       NameFour   1
  </code></pre>
  
  <p>Here is my ItemTable that has reference key to category table</p>
  
  <pre><code>Items Table
  --------------------------------------------
  ItemID   CategoryID SubCategoryID      ItemName
  1        1          2                  ItemOne
  2        1          3                  ItemTwo
  </code></pre>
  
  <p>How can I join it to get unique records like in example below, using LINQ to entity?</p>
  
  <p>The result has to be</p>
  
  <pre><code>ItemID               CategoryName   SubCategoryName           ItemName
  -----------------------------------------------------------------------
  1                    NameOne        NameTwo                   ItemOne
  2                    NameOne        NameThree                 ItemTwo   
  </code></pre>