Esempio n. 1
0
        static void Main(string[] args)
        {
            c = new GeneroServiceClient();

            c.BeginGetFirst10(GetFirst10Completed, null);

            c.BeginGetById(1, GetByIdCompleted, null);
            c.BeginGetById(10, GetByIdCompleted, null);
            c.BeginGetById(100, GetByIdCompleted, null);

            Console.ReadKey();
        }
Esempio n. 2
0
        static void Main()
        {
            var proxy = new GeneroServiceClient();

            var c = proxy.GetById(1);
            if (c != null) Console.WriteLine("{0} -> {1}", c.Id, c.Nome);

            c = proxy.GetById(10);
            if (c != null) Console.WriteLine("{0} -> {1}", c.Id, c.Nome);

            c = proxy.GetById(10000);
            if (c != null) Console.WriteLine("{0} -> {1}", c.Id, c.Nome);

            Console.WriteLine();

            var generos = proxy.GetFirst10();

            foreach (var item in generos)
            {
                Console.WriteLine("{0} -> {1}", item.Id, item.Nome);
            }

            Console.ReadKey();
        }