using Manage Nuget Package option we can install package for Microsoft.OData.Client
Now with the simple coding part, we need to reference following dll.
I have created this initConfiguration method to authenticate my call using Azure, GetAuthenticationHeader method is given on OAuthHelper class, we will pass true for web api projects.
Then i have created this fillOrder method to fill the list based on the query i have read from Dynamics ax 365 for purchase orders.
This is the main web api method for reading the purchase orders, i am reading top 50 for now.
After all this simple coding and all the configuration effort, when i click run on the project, i got this cool browser with my results of orders.
This is the result after all the effort,