Exemplo n.º 1
0
        private static async Task ListProduct(ProductService.ProductServiceClient client)
        {
            var response = client.GetAllProducts(new GetAllProductsRequest()
            {
            });

            while (await response.ResponseStream.MoveNext())
            {
                Console.WriteLine(response.ResponseStream.Current.Product.ToString());
            }
        }
Exemplo n.º 2
0
 public JsonResult GetAllProducts()
 {
     return(Json(client.GetAllProducts(), JsonRequestBehavior.AllowGet));
 }
Exemplo n.º 3
0
        public JsonResult GetAllProducts()
        {
            var products = client.GetAllProducts();

            return(Json(products, JsonRequestBehavior.AllowGet));
        }