dynamic-linq-query-builder
dynamic-linq-query-builder copied to clipboard
How to filter like All operator with list<int> field?
Hi ,
I required support of All operator.
Consider I have list of integer as input and want to check all the given values available in the list.
Input object,
User : [{ Name : “User abc”, ListInt : { 1, 2 ,3 , 4 } }]
Condition:
{ ‘value’ : [1, 2] };
Currently query builder supports,
In operator - support any of the given values in the list. Not In operator - support none of the given values in the list.
But, I need support of All operator – Check all the given values available in the list.
Is there a way to achieve?
Thanks, Kannan Eswar.
Someone recently added a PR that allows you to create custom operators, so you could create that custom All operator behavior and have it work that way. If you do so and feel like it would be useful to others, feel free to submit a PR.