Items count in OData v4 WebAPI response

前端 未结 4 1806
野性不改
野性不改 2021-02-14 03:47

How to return number of items in OData v4 HTTP response?

I need this number to pagination, so it should be number of items after filtering, but before \'skip\' and \'top

4条回答
  •  后悔当初
    2021-02-14 04:32

    That's what I am using with oData v4:

    Request.ODataProperties().NextLink, 
    
    Request.ODataProperties().TotalCount
    

提交回复
热议问题