Пример #1
0
        // GET: LaunchSite
        public ActionResult Index()
        {
            var service = new LaunchSiteService();
            var model   = service.GetAllLaunchSites();

            return(View(model));
        }
        // GET: LaunchSite
        //full list or filter by location
        public ActionResult Index(string searchString)
        {
            var service = new LaunchSiteService();
            var model   = service.GetAllLaunchSites();

            if (!String.IsNullOrEmpty(searchString))
            {
                model = model.Where(s => s.Location.Contains(searchString)).ToList();
            }
            return(View(model));
        }