I have a WebAPI built over a Domain specific data model which uses a proprietary data store.
The data store has a SDK which allows for typical retrieval/filtering operations that one might want to perform via OData such as 'and', 'or', 'eq', 'ne' and functions such as 'substring' etc.
My endpoint(s) accept ODataQueryOptions<T> where T = DTO.
I can get to the representation of $filter via the options.Filter which returns a FilterQueryOption
which in turn contains a FilterClause property representing an AST for the $filter.
I am looking for guidance and examples on:
Is there a best/prescribed way of traversing this AST so that I can built a corresponding domain-specific query to issue calls to the underlying data store via it's SDK.
If there is a supported way to do the above, will the navigation navigate the tree in a manner so as to preserve OData operator precedence
NOTE:
I am not using Web API 2.0
Implementing
IQueryableis not an option given the lack of proper guidance and the complexity/effort involved in doing this.