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

ExpressionParser finds Types from IEnumerable instead of IQueryable (breaks Code) (worked in 1.3.9) #801

Closed
jogibear9988 opened this issue Apr 18, 2024 · 1 comment
Assignees
Labels

Comments

@jogibear9988
Copy link
Contributor

jogibear9988 commented Apr 18, 2024

1. Description

I've the following Code:

                    var expression = DynamicExpressionParser.ParseLambda(qry.GetType(), null, complexQueryString, objs.ToArray());
                    Delegate del = expression.Compile();
                    var resultIv = del.DynamicInvoke(qry);
                    qry = resultIv as IQueryable;

where qry.GetType() is of type Table wich inherits from IQueryable

My compleyQueryString looks like this:

  "it.GroupBy(MessageClassName).Select(it.Key).Where(it != null).Distinct().OrderBy(it).Take(1000)"

this results in the following Expression Tree (in 1.3.10 and later)
image

but in Version 1.3.9 it has the following Tree:

image

2. Exception

There is no exception, but the Query is no IQueryable after the Parsing any more, and so my code fails

@StefH StefH self-assigned this Apr 18, 2024
@StefH StefH added the bug label Apr 18, 2024
@StefH
Copy link
Collaborator

StefH commented Apr 23, 2024

@jogibear9988 Thank your for reporting this issue.
Fixed with #802

@StefH StefH closed this as completed Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants