Exemplo n.º 1
0
        public async Task <IEnumerable <Product> > GetProductsByName(string name)
        {
            var json     = "{ \"names\": \"" + name + "\" }";
            var response = await WebHelpers.ExecuteWebApiCall(json);

            return(JsonConvert.DeserializeObject <IEnumerable <Product> >(response));
        }
Exemplo n.º 2
0
        public async Task <Product> GetProductById(string barcode)
        {
            var json     = "{ \"id\": \"" + barcode + "\" }";
            var response = await WebHelpers.ExecuteWebApiCall(json);

            return(JsonConvert.DeserializeObject <Product>(response));
        }