How to create an OData URI from a DataManagerRequest?

Hi,

I'm using SfDataManager with Custom Adapter to make requests to my application's OData server, which uses the MVVM pattern.
For that I do the dependency injection of my View Model inside the Data Adapter.



In my View Model I need to transform the DataAdaptorRequest.Where into an OData filter and the DataAdaptorRequest.Sorted into OData orderby to create the Uri.





Do you have any method for setting up this Uri for the requisition or some more efficient solution than doing as my example?


5 Replies 1 reply marked as answer

JP Jeevakanth Palaniappan Syncfusion Team April 5, 2021 10:16 AM UTC

Hi Danilo, 

Greetings from Syncfusion support. 

We have validated your query and we would like to inform you that we have default methods like PerformFiltering, PerformSorting to handle the data operations like filtering, Sorting etc... But if you want to handle the data operation in the odata service in odata way then it has to be handled in your side as like you have handled. Please refer the below documentation for your reference. 


Regards, 
Jeevakanth SP. 


Marked as answer

DD Danilo Dias April 5, 2021 12:48 PM UTC

Hi Jeevakanth,

Thanks for the quick response.

I had already read this documentation and as I understand it, in that case I would need to have an object with all the records, which would work well with an API.
For OData it makes more sense for me to handle the request myself, receiving only filtered records.
Anyway, it would be interesting to have a way to handle the component's native OData request.

Regards.


JP Jeevakanth Palaniappan Syncfusion Team April 10, 2021 04:05 AM UTC

Hi Danilo, 

Thanks for the update. 

We suggest you to kindly share us your sample which will be helpful for us to check your scenario. After checking your scenario, we will update the further details. 

Regards, 
Jeevakanth SP. 



DD Danilo Dias April 14, 2021 03:23 PM UTC

Hi Jeevakanth,

I managed to solve in another topic about the ordering of the columns.


Thanks


JP Jeevakanth Palaniappan Syncfusion Team April 15, 2021 05:46 AM UTC

Hi Danilo, 
 
We are glad that you have resolved the reported problem. Please get back to us if you have any other queries. 
 
Regards, 
Jeevakanth SP. 


Loader.
Up arrow icon