title: The Include path expression must refer to a navigation property defined
body: <p>I'm trying to create a generic include, but I get this error. What is wrong? Thank you.</p>
  
  <blockquote>
    <p>The Include path expression must refer to a navigation property
    defined on the type. Use dotted paths for reference navigation
    properties and the Select operator for collection navigation
    properties.</p>
  </blockquote>
  
  <pre><code>_repository.FindWithIncludes(..., new List&lt;...&gt;
      {
          x =&gt; x.Property1,
          x =&gt; x.Property2,
      });   
  
   public ICollection&lt;TEntity&gt; FindWithIncludes(Expression&lt;Func&lt;TEntity, bool&gt;&gt; currentExpression, List&lt;Expression&lt;Func&lt;TEntity, object&gt;&gt;&gt; propertiesToInclude)
      {
          using (var customContext = new TContext())
          {
              return customContext.Set&lt;TEntity&gt;().Include(x =&gt; propertiesToInclude.Select(currentProperty =&gt; currentProperty)).Where(currentExpression).ToList();
          }
      }
  </code></pre>