public IEnumerable <Store> GetStoresByName(string name) { try { return(name == null ? _storeBl.GetAllStores() : _storeBl.GetStoreByName(name)); } catch { throw new Exception("failed getting store by name"); } }
// GET: Store public ActionResult Index() { return(View(_storeBl.GetAllStores())); }