Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid Group expression usage #4

Open
dcomartin opened this issue Feb 6, 2020 · 2 comments
Open

Invalid Group expression usage #4

dcomartin opened this issue Feb 6, 2020 · 2 comments
Assignees

Comments

@dcomartin
Copy link

DynamicQueryable version

2.0.25

Steps to reproduce

https://gist.github.com/dcomartin/3e6fff415f6886c1b3c3b50b377fa0fc

Expected behavior

Should behave and return the same results as the linq statement.

Actual behavior

Throws a System.Exception: Invalid Group expression usage. This is from the Jokenizer which this package depends on.

@umutozel umutozel self-assigned this Feb 6, 2020
@umutozel
Copy link
Owner

umutozel commented Feb 10, 2020

Fixed with Jokenizer.Net 1.1.1 version.

Published new Nuget (2.0.25).

@gbreen12
Copy link

gbreen12 commented Jan 17, 2022

I think I'm still seeing this problem on 2.0.25. Might be something different but it's the same error. This is what I've got:

var where = "(FirstName.ToLower().Contains(@0) || FirstName.ToLower().Contains(@1)) && (LastName.ToLower().Contains(@0) || LastName.ToLower().Contains(@1))"
var searchTerms = new List<string> { "ron", "edwards" };
query = query.Where(where, searchTerms);

If I remove the parentheses around the ORs it works but then it doesn't filter correctly

@umutozel umutozel reopened this Feb 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants