/* Step 3 */ /* Step 10 */ public ActionResult SearchResult(FilmSearchViewModel searchModel) { /* Step 14 */ IList <Film> films = _dal.SearchFilms(searchModel.Title, searchModel.Description, searchModel.ReleaseYear, searchModel.MinLength, searchModel.MaxLength, searchModel.Rating); /* Step 15 */ return(View(films)); }
// 1. Add a SearchResult Action public ActionResult SearchResult(FilmSearchModel filmSearch) //7. Add Model as a param { var films = dal.SearchFilms(filmSearch.Title, filmSearch.Description, filmSearch.ReleaseYear, filmSearch.MinLength, filmSearch.MaxLength, filmSearch.Rating); return(View("SearchResult", films)); //8. pass in the films as the model }