Exemplo n.º 1
0
 // Get an entire entity set.
 static void ListAllProducts(ProductService.Container container)
 {
     foreach (var p in container.Products)
     {
         DisplayProduct(p);
     }
 }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            Uri uri       = new Uri("http://localhost:1234/odata/");
            var container = new ProductService.Container(uri);

            // ...
        }
Exemplo n.º 3
0
    static void Main(string[] args)
    {
        Uri uri       = new Uri("http://localhost:18285/odata/");
        var container = new ProductService.Container(uri);

        container.SendingRequest2 += (s, e) =>
        {
            Console.WriteLine("{0} {1}", e.RequestMessage.Method, e.RequestMessage.Url);
        };

        // Get the list of products
        ListAllProducts(container);
    }