AutoQueryable
AutoQueryable copied to clipboard
Send X-Total-Count header
It would be great to be able to optionally send an X-Total-Count header to show the total number of items in the collection instead of using wrapWith total-count.
hi @henkosch , Thanks for your patience
This feature could only work with filter version of AQ.
But AQ could be used without filters: .AutoQueryable(queryString)
I'll try to add this feature to AQ 2.2.x in a few weeks (2.1 will be focus on alias).
during this time you could use something like this:
dynamic t = queryable.AutoQueryable("...wrapwith=total-count");
setHeaders("X-Total-Count", t.TotalCount);
return new OkObjectResult(t.Result);
not tested ;)