-
Notifications
You must be signed in to change notification settings - Fork 18
Description
It looks like when you call the ODATA endpoint and provide $count=true
it will return a "@odata.count" property with the full count of the items.
This is useful if you are using paging and want to return only the top 10 but want to know the total number of search results.
In the Acumatica.RESTCLient.ODataApi
project there is a class called ODataObject.cs.
I propose adding a count property to this class to get out this value.
[DataMember(Name = "odata.count", EmitDefaultValue = false)] public int? Count;
The ApiClientExtensions
class will also need updated to be able to return this value.
Maybe new methods for returning results with a count.
public static (IEnumerable<JObject> Results, int Count) GetODataWithCount(...)
These methods would then apply the $count=true and return a count with the results?