Last active
August 29, 2015 14:06
-
-
Save ODataTeam/6044bb6eafb61efd7561 to your computer and use it in GitHub Desktop.
This file contains 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
var parser = new ODataUriParser( | |
extModel.Model, | |
ServiceRoot, | |
new Uri("http://demo/odata.svc/People(1)/Pets/TestNS.Fish?$orderby=Color")); | |
var path = parser.ParsePath(); | |
var clause = parser.ParseOrderBy(); | |
var parser2 = new ODataUriParser( | |
extModel.Model, | |
ServiceRoot, | |
new Uri("http://demo/odata.svc/people(1)/pets/testns.fish?$ORDERBY=color")) | |
{ | |
Resolver = new ODataUriResolver { EnableCaseInsensitive = true } | |
}; | |
// Identical to path and clause | |
var path2 = parser2.ParsePath(); | |
var clause2 = parser2.ParseOrderBy(); | |
// Query option parser also supports case insensitive | |
var parser3 = new ODataQueryOptionParser( | |
extModel.Model, | |
extModel.Fish, | |
extModel.PetSet, | |
new Dictionary<string, string> | |
{ | |
{"$orderby", "color"} | |
}) | |
{ | |
Resolver = new ODataUriResolver { EnableCaseInsensitive = true } | |
}; | |
var clause3 = parser3.ParseOrderBy(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment