// GET: LocationController
        public ActionResult Index()
        {
            var locations  = _storeRepo.GetAllStores();
            var viewStores = ViewModelMapper.MapStores(locations);

            return(View(viewStores));
        }
Exemple #2
0
        // GET: AdminController
        public ActionResult Index(string zipCode)
        {
            var stores     = _storeRepo.GetAllStores();
            var viewStores = ViewModelMapper.MapStores(stores);

            if (!String.IsNullOrEmpty(zipCode))
            {
                var searchedStores = _storeRepo.GetAllStoresByZipcode(zipCode);
                viewStores = ViewModelMapper.MapStores(searchedStores);
            }
            return(View(viewStores));
        }