Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            ServiceShopClient client  = new ServiceShopClient();
            Commodity         snikers = new Commodity()
            {
                Id = 1, Category = "Sweet", Name = "Snikers", Price = 8.5m
            };

            client.AddCommoity(snikers);

            Commodity c = client.GetCommodity(1);

            Console.WriteLine(c.Name);
        }
Ejemplo n.º 2
0
 private MyServiceClient()
 {
     myServiceClient = this;
     Client          = new ServiceShopClient(new System.ServiceModel.InstanceContext(this));
 }