using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Services.Client;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
try
{
Uri url = new Uri("http://win-nc3sculi90s:8101/DynamicsAx/Services/ODataQueryService/");
var container = new productservice.ODataQueryService(url);
//productservice.ODataQueryService context = new productservice.ODataQueryService(url);
container.Credentials = System.Net.CredentialCache.DefaultCredentials;
var ibnTable = from p in container.IBN_table
select p;
foreach (var data in ibnTable)
{
Console.WriteLine(data.IBN_table_1_Name);
}
Console.ReadLine();
}
catch (Exception ex)
{
Console.WriteLine(ex.InnerException);
Console.ReadLine();
}
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Services.Client;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
try
{
Uri url = new Uri("http://win-nc3sculi90s:8101/DynamicsAx/Services/ODataQueryService/");
var container = new productservice.ODataQueryService(url);
//productservice.ODataQueryService context = new productservice.ODataQueryService(url);
container.Credentials = System.Net.CredentialCache.DefaultCredentials;
var ibnTable = from p in container.IBN_table
select p;
foreach (var data in ibnTable)
{
Console.WriteLine(data.IBN_table_1_Name);
}
Console.ReadLine();
}
catch (Exception ex)
{
Console.WriteLine(ex.InnerException);
Console.ReadLine();
}
}
}
}
No comments:
Post a Comment