예제 #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());
            }
        }
예제 #2
0
 public JsonResult GetAllProducts()
 {
     return(Json(client.GetAllProducts(), JsonRequestBehavior.AllowGet));
 }
예제 #3
0
        public JsonResult GetAllProducts()
        {
            var products = client.GetAllProducts();

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