title: Net Core: Entity Framework ThenInclude with Projection Select
body: <p>I am trying to conduct ThenInclude with Select Projection in Entity Framework.</p>
  
  <p>We have three tables, ProductType joins to ProductTypeDepartmentBridge, which then joins to Departments table. </p>
  
  <p>For some reason, in projection select, I cannot select only the columns from Department. Intellisense is giving an error and it won't show up. However, I can at least see thenincude to Department table.</p>
  
  <pre><code>        var departmentsByProductType = unitOfWork.DBSet&lt;Productype&gt;()
              .Include(d =&gt; ProductTypeDepartmentBridge)
              .ThenInclude(d =&gt; d.Department)
              .Where(d =&gt; d.ProductTypeId == 5)
              .Select(d =&gt; new 
              {
                  DepartmentId = d.DepartmentId,
                  DepartmentName = d.DepartmentName
              });
  </code></pre>
  
  <p><strong>Error:</strong></p>
  
  <pre><code>                DepartmentId = d.DepartmentId,
                  DepartmentName = d.DepartmentName
  </code></pre>
  
  <p>Note: A ProductType can return multiple Departments, since Bridge table has many-to-many relationship.</p>