Hi,
Thanks for the great tool!
I've found that if I'm applying an expression via Invoke then Expand, while c# syntax will allow me to omit the parameter for a lambda where the method group's natural type matches that of the expected lambda, e.g. x => func.Invoke(x) can just be replaced with func.Invoke, LinqKit does not produce the same expanded expression for each.
For example:
Expression<Func<int, bool>> isExpensive = p => p > 1000;
Expression<Func<Purchase, bool>> hasAnyExpensivePrices = p => p.Prices.Any(pr => isExpensive.Invoke(pr));
Console.WriteLine(hasAnyExpensivePrices.Expand().ToString());
// Output: p => p.Prices.Any(pr => (pr > 1000))
Expression<Func<Purchase, bool>> hasAnyExpensivePricesMethodGroup = p => p.Prices.Any(isExpensive.Invoke);
Console.WriteLine(hasAnyExpensivePricesMethodGroup.Expand().ToString());
// Output: p.Prices.Any(Convert(Boolean Invoke[Int32,Boolean](System.Linq.Expressions.Expression`1[System.Func`2[System.Int32,System.Boolean]], Int32).CreateDelegate(System.Func`2[System.Int32,System.Boolean], p => (p > 1000)), Func`2))
record Purchase(int[] Prices);
Is this something that can be fixed? It's an easy mistake to make, particularly when ReSharper always suggests I do it!

Hi,
Thanks for the great tool!
I've found that if I'm applying an expression via
InvokethenExpand, while c# syntax will allow me to omit the parameter for a lambda where the method group's natural type matches that of the expected lambda, e.g.x => func.Invoke(x)can just be replaced withfunc.Invoke, LinqKit does not produce the same expanded expression for each.For example:
Is this something that can be fixed? It's an easy mistake to make, particularly when ReSharper always suggests I do it!