dbelmont/ExpressionBuilder

Pass expression to filter.By method

MaklaCof opened this issue · 2 comments

Hi!
Is it possible to use expression for filtering.

Something like that:

var filter = new Filter<DbMyEntity>();
filter.By("Field3", Operation.IsNotNull);
filter.By(t => !t.Field1.HasValue || t.Field1.HasValue && array.Contains(t.Field1.Value), Connector.Or);
filter.By("Field2", Operation.IsEmpty);

That would be super awesome.

Hi @MaklaCof,
Sorry for the late reply. That's currently not supported.
So, what would exactly be the use for this? Why do you need to use the filter in those two different ways?
Cheers.

I can't remember. Sorry. I moved on with LINQ Dynamic.