You can also connect Document Services with Visual Studio. Just add service reference with correct address.
You can see example, written in C#.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ODATA_Test.MAN_CustomersNS;
using System.Net;
namespace ODATA_Test
{
class Program
{
static void Main(string[] args)
{
var uri = new Uri("http://192.168.20.6:8104/DynamicsAx/Services/ODataQueryService" );
ODataQueryService service = new ODataQueryService(uri);
service.Credentials = new NetworkCredential { UserName = "***", Password = "***" , Domain = "***" };
var query = from c in service.MAN_Customers
select c;
foreach (MAN_Customers item in query)
{
Console.WriteLine(item.CustTable_AccountNum + " " + item.DirPartyTable_Name);
}
Console.ReadKey();
}
}
}