Let ASP. WebAPI support the OData protocol for paged query operations

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.