Quantcast
Channel: Active questions tagged atompub - Stack Overflow
Viewing all articles
Browse latest Browse all 30

Create custom OData previouslink in WebAPI

$
0
0

I have a WebApi OData API.I want to perform some pagination. I have managed to fill the nextlink since it exists in OData.

public IQueryable<Product> Get(int min=0,int max=0)    {        this.Request.ODataProperties().NextLink = new Uri(Url.ODataLink(              new EntitySetPathSegment("Products"),                       new KeyValuePathSegment(Microsoft.Data.OData.Query.ODataUriUtils.ConvertToUriLiteral("100", Microsoft.Data.OData.ODataVersion.V3))         ));        ///more code.....}

The problem is that like I can set the NextLink i want to do the same with a PreviousLink (AtomPub)

Is that possible with OData?How can I create that custom field?

Thanks in advance


Viewing all articles
Browse latest Browse all 30

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>