LINQKit icon indicating copy to clipboard operation
LINQKit copied to clipboard

Documentation error for PredicateBuilder?

Open NetMage opened this issue 3 years ago • 3 comments

The documentation says that AsExpandable is needed when using PredicateBuilder and that Invoke is used with the original expression when adding an And or Or clause, but the output from LINQKit.Microsoft.EntityFrameworkCore v5.0.26 doesn't use Invoke and doesn't appear to need AsExpandable any more.

NetMage avatar Oct 11 '21 21:10 NetMage

I'm interested as well in the answer to this as the line in the documentation surprised me while I was reading it after using LinqKit for the last few years.

lawhorkl avatar Mar 09 '23 20:03 lawhorkl

It would seem, that since #54 you no longer need AsExpandable or Expand for every predicate. There are however cases were you may benefit from using it, and if you use e.g. Invoke yourself or [Expandable] it is still needed, as the PredicateBuilder does not internally call Expand, but only not uses Invoke any longer.

TheConstructor avatar Oct 07 '23 12:10 TheConstructor

@StefH I have lost all context over this after 6 years. Is a documentation update sufficient?

EdwardBlair avatar Jan 04 '24 22:01 EdwardBlair