public IEnumerable <string> Get()
        {
            List <string> genericProductNames = SQLQueries.GetGenericProductNames();

            //string genericProducts = new JavaScriptSerializer().Serialize(genericProductNames);

            return(genericProductNames);
        }
Пример #2
0
        public string Get(string category)
        {
            List <Product> Products = SQLQueries.GetProductListings(category);

            //Convert to JSON
            string products = JsonConvert.SerializeObject(Products);

            return(products);
        }