Пример #1
0
        public JsonResult Get(string item, string location)
        {
            Scrapper.Scrapper scrapper = new Scrapper.Scrapper(item, location);
            //List<Scrapper.Restaurant> restaurents = scrapper.GetResult();

            List <Scrapper.Restaurant> restaurents = new List <Restaurant>();

            Restaurant restaurant;

            for (int i = 0; i < 10; i++)
            {
                restaurant         = new Restaurant();
                restaurant.Name    = "Name_" + i;
                restaurant.Address = "Address_" + i;
                restaurant.Zipcode = "ZipCode_" + i;
                restaurents.Add(restaurant);
            }

            return(Json(restaurents, JsonRequestBehavior.AllowGet));
        }
Пример #2
0
 protected override void OnStart(string[] args)
 {
     var scrapper = new Scrapper();
 }