public ActionResult Index(string firstName, string lastName) { string storeLoc = TempData.Peek("adminLoc").ToString(); Dictionary <string, CCustomer> customers = _storeRepo.GetAllCustomersAtOneStore(storeLoc); var viewCustomer = ViewModelMapper.MapCustomers(customers); if (!String.IsNullOrEmpty(firstName) && !String.IsNullOrEmpty(lastName)) { // get var searchedCustomers = _storeRepo.GetAllCustomersAtOneStoreByName(storeLoc, firstName, lastName); viewCustomer = ViewModelMapper.MapCustomers(searchedCustomers); } return(View(viewCustomer)); }