Пример #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);
        }
Пример #2
0
 private MyServiceClient()
 {
     myServiceClient = this;
     Client          = new ServiceShopClient(new System.ServiceModel.InstanceContext(this));
 }