This is my personal 拙笔 when I use ASP. NET MVC WebAPI to support the OData protocol for paging query services.
The code has been developed on the Oschina. Interested friends can see, welcome to point out the shortcomings.
I've seen a few articles in the garden about ASP. NET MVC WebAPI Support OData protocol, very inspired,
But for the data paged query under the OData protocol, I really didn't find anything that satisfied me, it might be an individual's temper. Don't like complexity.
For the WebAPI Support OData protocol, the benefits are not much to say, anyway, I personally am very happy to use it to do the service interface and so on.
The theme of this note is to use the simplest way to implement paged query services. Straight up below.
See what the client receives from the data?
Just like, Total,data. 2 things, maybe you're thinking ~, simple. Yes, it's really simple.
That's a look at the server.
Yes, you are not mistaken, very simple, a odpageresultattribute on it.
Here are some of the notes I wrote about this OData. People are old, the skull is not so, it must be remembered.
--------------------------------------------------------------------------------------------------------------- ---------
I use ASP. Webapi to support the OData protocol for paging operations (first article)
Address: http://hotboy.blog.51cto.com/8826994/1651240
I use ASP. Webapi to support the OData protocol for paging operations (second article)
Address: http://hotboy.blog.51cto.com/8826994/1651277
I use ASP. Webapi to support the OData protocol for paging Operations (third article)
Address: http://hotboy.blog.51cto.com/8826994/1654528
Source code Related
Git:[email Protected]:hotbody/asp.net-webapi-odata-pagequery.git
Https:https://git.oschina.net/hotbody/asp.net-webapi-odata-pagequery.git
Brwoser:http://git.oschina.net/hotbody/asp.net-webapi-odata-pagequery
Let ASP. WebAPI support the OData protocol for paged query operations