-
-
Notifications
You must be signed in to change notification settings - Fork 231
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
Produce Dynamic LINQ strings from expression trees #423
Comments
Something similar has been discussed in #230 . |
Hello @zspitz , No, Dynamic LINQ doesn't offer this kind of feature. Perhaps david-garcia-garcia in the mentioned issue could maybe help you more. The most up to date documentation which has been added during the summer can be found here: https://dynamic-linq.net/overview Best Regards, Jon Performance Libraries Runtime Evaluation |
@JonathanMagnan I am very pleased to let you know that as of version 3.2, the ExpressionTreeToString library can produce corresponding Dynamic LINQ for many expressions. For example: public class Person {
public string LastName { get; set; }
public string FirstName { get; set; }
public DateTime DOB { get; set; }
}
Expression<Func<Person, bool>> filter = p => p =>
p.LastName == "A" ||
p.FirstName == "B" ||
p.DOB == DateTime.MinValue ||
p.LastName == "C" ||
p.FirstName == "D";
Console.WriteLine(expr.ToString("Dynamic LINQ"));
// prints:
/*
LastName in ("A", "C") || DOB == DateTime.MinValue || FirstName in ("B", "D")
*/ Please feel free to refer to the library in help and documentation. |
I've written a library producing various string representations of expression trees. I am now considering a Dynamic LINQ representation. In other words, from an expression tree like this:
produce a string like the following:
Does System.Linq.Dynamic.Core have such functionality?
Also, for this purpose, where can I find the most up-to-date documentation describing the System.Linq.Dynamic.Core string syntax?
The text was updated successfully, but these errors were encountered: