Пример #1
0
        public async void GetProducts()
        {
            try {
                Service.Service serv = new Service.Service();
                ListProducts = await serv.AllProducts();

                Console.WriteLine("Todos los productos Obtenidos-========>" + ListProducts.Count);
            } catch (Exception ex) {
                Console.WriteLine("No se pudieron obtner los productos");
                Console.WriteLine("Unexpected Error--->> {0}", ex);
            }
        }
Пример #2
0
        public async Task <List <ProductsGeneral> > GetListProducts()
        {
            try {
                Service.Service serv = new Service.Service();
                ListProducts = await serv.AllProducts();

                Console.WriteLine("Todos los productos Obtenidos-========>" + ListProducts.Count);
                return(ListProducts);
            } catch (Exception ex) {
                Console.WriteLine("No se pudieron obtner los productos");
                Console.WriteLine("Unexpected Error--->> {0}", ex);
            }
            return(null);
        }