You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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 calledODataObject.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?
The text was updated successfully, but these errors were encountered: