title: LINQ predicate in Entity Framework
body: <p>I want to call method</p>
  
  <pre><code> query.Range(item =&gt; item.Date, filter.Date);
  </code></pre>
  
  <p>and have method:</p>
  
  <pre><code> public static IQueryable&lt;T&gt; Range&lt;T&gt;(this IQueryable&lt;T&gt; query, Func&lt;T, DateTime&gt; func, DateTime range)
      {
         return query.Where(item=&gt; func(item) &lt;= range); // &lt;&lt;-- Error "func(item)"
      }
  </code></pre>
  
  <p><strong>Error:</strong> The LINQ expression node type 'Invoke' is not supported in LINQ to Entities.</p>
  
  <p>How to use function?</p>