示例#1
0
        static async Task Main(string[] args)
        {
            HelloWorldClient.Hello("Shahid");

            await CustomersMaintClient.CreateCustomers(2);

            var update = new UpdateCustomerRequest
            {
                Id        = "e3cf5ae6-d149-4b80-8bd8-aea03f2b0754",
                FirstName = "Shahid Ali",
                LastName  = "Khan",
                Address   = "Charsadda, Pakistan",
                Phone     = "123490000"
            };
            await CustomersMaintClient.UpdateCustomer(update);

            await CustomersMaintClient.GetAllCustomers();

            await CustomersMaintClient.DeleteCustomer("e3cf5ae6-d149-4b80-8bd8-aea03f2b0754");

            await CustomersMaintClient.GetAllCustomers();

            await CustomersMaintClient.DeleteAllCustomers();

            await CustomersMaintClient.GetAllCustomers();

            await CustomersMaintClient.CreateCustomers(10);

            await CustomersMaintClient.GetAllCustomers();

            Console.ReadLine();
        }
        static void Main(string[] args)
        {
            var service = new HelloWorldClient("BasicHttp");

            Console.WriteLine("Enter your first name.");
            var first = Console.ReadLine();

            Console.WriteLine("Enter your last name.");
            var last    = Console.ReadLine();
            var NewName = new Name()
            {
                FirstName = first, LastName = last
            };

            Console.WriteLine("Loading...");
            var greeting = service.Hello(NewName);

            Console.Clear();
            Console.WriteLine(greeting);
            Console.ReadKey();
        }