Exemplo n.º 1
0
        public ActionResult Index()
        {
            var profiler = MiniProfiler.Current; // it's ok if this is null

            var favorite = idataRepository.GetSearchResults("", false, false);

            var viewmodel = new HomeViewModel
            {
                searchy	= favorite
            };

            return View(viewmodel);
        }
Exemplo n.º 2
0
        public ActionResult Index(FormCollection collecty)
        {
            string searchTerm = collecty["Searchy"];
            bool isGhost = Convert.ToBoolean(collecty["isGhost"]);
            //bool isVehicle = Convert.ToBoolean(collecty["isVehicle"]);
            var profiler = MiniProfiler.Current; // it's ok if this is null

            var favorite = idataRepository.GetSearchResults("%"+searchTerm+"%", isGhost, true);
            //var favorite = idataRepository.GetSearchResults("%" + searchTerm + "%", isGhost, isVehicle);

            var viewmodel = new HomeViewModel
            {
                searchy = favorite
            };

            return View(viewmodel);
        }