Last active
August 29, 2015 14:03
-
-
Save ODataTeam/492c2cc87a01ee5a617b to your computer and use it in GitHub Desktop.
Parsing query options
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Uri fullUri = new Uri("Products?$select=ID&$expand=ProductDetail" + | |
"&$filter=Categories/any(d:d/ID%20gt%201)&$orderby=ID%20desc" + | |
"&$top=1&$count=true&$search=tom", UriKind.Relative); | |
ODataUriParser parser = new ODataUriParser(model, serviceRoot, fullUri); | |
SelectExpandClause expand = | |
parser.ParseSelectAndExpand(); //parse $select, $expand | |
FilterClause filter = parser.ParseFilter(); // parse $filter | |
OrderByClause orderby = parser.ParseOrderBy(); // parse $orderby | |
SearchClause search = parser.ParseSearch(); // parse $search | |
long? top = parser.ParseTop(); // parse $top | |
long? skip = parser.ParseSkip(); // parse $skip | |
bool? count = parser.ParseCount(); // parse $count |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment