Exemplo n.º 1
0
        // GET: SpaceStation
        public ActionResult Index()
        {
            var service = new SpaceStationService();
            var model   = service.GetAllSpaceStations();

            return(View(model));
        }
        // GET: SpaceStation
        //Filter by capacity
        public ActionResult Index(string searchString)
        {
            var service = new SpaceStationService();
            var model   = service.GetAllSpaceStations();

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