コード例 #1
0
        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);
        }