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

LINQ Expression Trees Support #54

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

aldrashan
Copy link

Adds support for building LINQ Expression trees by adding extension method to the Connector enum.

@aldrashan
Copy link
Author

Usage:

Or statement of 2 filters:

var f1 = new Filter<Person>();
f1.By("Birth.Date", Operation.IsNotNull);
var f2 = new Filter<Person>();
f2.By("Birth.Date", Operation.GreaterThan, new DateTime(1980, 1, 1));
var orExpression = Connector.Or.Group<Person>(f1, f2).GetFilter();
var people = People.Where(orExpression);

Simple filter tree:

var orExpression = Connector.Or.Group(Connector.And.Group<Person>(f1, f2), Connector.And.Group<Person>(f3, f4)).GetFilter();

Repository owner deleted a comment Jun 26, 2019
Repository owner deleted a comment Jun 26, 2019
Repository owner deleted a comment Jun 26, 2019
Repository owner deleted a comment Jun 26, 2019
Repository owner deleted a comment Jun 26, 2019
@aldrashan aldrashan mentioned this pull request Sep 8, 2019
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

Successfully merging this pull request may close these issues.

2 participants