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