/* Creates the grid data */
        public ActionResult List(SearchParameter searchP, SearchModel searchModel)
        {            
            var model = _stores.AsQueryable();

            GridData data = model.ToGridData(searchModel, new[] { "Id", "Name", "Address" });
            return Json(data, JsonRequestBehavior.AllowGet);
        }
        /* Notice the List methid accepts an additional
         * SearchParameter parameter - this is achieved using the -
         * Html.BuildQuery method used in the view Grid declaration */
        public ActionResult List(SearchParameter searchP, SearchModel searchModel)
        {
            StoreRepository repository = new StoreRepository();

            List<Store> stores = repository.ListAll();

            var model = stores.AsQueryable();
            return Json(model.ToGridData(searchModel, new[] { "Id", "Name", "Address" }), JsonRequestBehavior.AllowGet);
        }
        public ActionResult Search()
        {
            SearchParameter sp = new SearchParameter();
            sp.UserName = "******";
            sp.Created = DateTime.Now;

            ViewData["SearchParams"] = sp;
            return View();
        }