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

DynamicExpression gone in version 1.0.3.4 #25

Closed
rpaschoal opened this issue Jun 14, 2016 · 6 comments
Closed

DynamicExpression gone in version 1.0.3.4 #25

rpaschoal opened this issue Jun 14, 2016 · 6 comments

Comments

@rpaschoal
Copy link

rpaschoal commented Jun 14, 2016

Hello,

I can't find DynamicExpression class in version 1.0.3.4 anymore.

Was it renamed?

Thanks! Cheers.

@rpaschoal rpaschoal changed the title DynamicExpressions gone in version 1.0.3.4 DynamicExpression gone in version 1.0.3.4 Jun 14, 2016
@StefH
Copy link
Collaborator

StefH commented Jun 14, 2016

Renamed to DynamicExpressionParser.

@rpaschoal
Copy link
Author

rpaschoal commented Jun 14, 2016

Thank you =)

Quick question, I see you are returning "LambdaExpression" type. How can I cast it to "Expression < Func < Entity, bool > >" ?

The reason why I am asking this is because I am using it to build custom LINQs as well, based on expressions.

I tried like this but I get exception:

(Expression< Func < Entity , bool > >)Expression.Lambda(expression1, null);

@StefH
Copy link
Collaborator

StefH commented Jun 14, 2016

@rpaschoal
Copy link
Author

rpaschoal commented Jun 14, 2016

Hmmm, didn't work... I need to get that type of result without supplying the paremeters. I am getting an exception telling me I should supply the paremeters.

I am basically trying to use it as in "System.Linq.Dynamic" as it follows:

var expression1 = !String.IsNullOrEmpty(expression) ? System.Linq.Dynamic.DynamicExpression.ParseLambda< Entity, bool >(expression, null) : null;

Where "expression" can be any LINQ where condition as a string.

@rpaschoal
Copy link
Author

Oh mate, sorry! That worked =)

Thank you very much. Nice piece of work done here in this repo.

Cheers!

@StefH
Copy link
Collaborator

StefH commented Jun 15, 2016

closed

@StefH StefH closed this as completed Jun 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants