I was recently attempting to add OData support to my ASP.NET Web API application when I encountered the following error message:
My friend then pointed me to this StackOverflow forum posting: http://stackoverflow.com/questions/27860997/where-does-webapi-2-2-odata-v4-enablequery-apply
This changed how to use the EnableQuery attribute globally in my WebApiConfig.cs file as follows:
My friend then pointed me to this StackOverflow forum posting: http://stackoverflow.com/questions/27860997/where-does-webapi-2-2-odata-v4-enablequery-apply
This changed how to use the EnableQuery attribute globally in my WebApiConfig.cs file as follows:
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
config.Filters.Add(new EnableQueryAttribute() | |
{ | |
PageSize = 2 | |
// .. other settings | |
}); |
No comments:
Post a Comment