asp.net-core-2.1

How to Parse OData $filter in C#

浪子不回头ぞ 提交于 2020-08-27 02:17:20
问题 Manipulate odata filter How can i manipulate filter in the backend and want the key value pairs of the filter query parameters? Expression would like below "?$filter =((Name eq 'John' or Name eq 'Grace Paul') and (Department eq 'Finance and Accounting'))" As there are 2 filters concatenated & how can i get the values like Filter 1: Key: Name Operator: eq Value: Name Operator: or Filter 2: Key: Name Operator: eq Value: Grace Paul Operator: and Filter 3: Key: Department Operator: eq Value: