开发者

OData and case sensitivity

I've been messing with the OData and realized that URIs are case sensitive. .../Northwind.svc/Products != .../Northwind.svc/products Is this done on purpose? is there a way to ma开发者_Go百科ke it case insensitive?


The recommended solution is to either use the supported OData functions toupper or tolower to work out the case sensitivity issues (when using a filter$ command) and get the full result set.

I wrote a brief post explaining this a bit further in detail:
Dealing With Case Sensitivity in OData


Here's an example:

/people?$filter=tolower(Name) eq tolower('jAmes') - 

This would return you all people with name is 'James' (case insensitive, could be 'JAMES', 'james', 'JamES', etc.
Hope this will help

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜