/// <summary>
        /// Receives the search result request and goes to th database looking for the information.
        /// </summary>
        /// <param name="request">A request model that contains the search parameters.</param>
        /// <returns></returns>
        public ActionResult SearchResult(FilmSearch filmSearch)
        {
            /* Call the DAL and pass the values as a model back to the View */
            IList <Film> films = filmDAO.GetFilmsBetween(filmSearch.Genre, filmSearch.MinimumLength,
                                                         filmSearch.MaximumLength);

            return(View(films));
        }
        /// <summary>
        /// Receives the search result request and goes to th database looking for the information.
        /// </summary>
        /// <param name="request">A request model that contains the search parameters.</param>
        /// <returns></returns>
        public ActionResult SearchResult(FilmSearch search)
        {
            FilmDAO      dao    = new FilmDAO(connectionString);
            IList <Film> result = dao.GetFilmsBetween(search.Genre, search.MinLength, search.MaxLength);

            return(View(result));
            /* Call the DAL and pass the values as a model back to the View */
        }
        public ActionResult SearchResult(FilmSearch request)
        {
            IFilmDAL     dal   = new FilmDAL(@"Data Source=.\SQLEXPRESS;Initial Catalog=DVDStore;Integrated Security=True");
            IList <Film> films = dal.GetFilmsBetween(request.Genre, request.MinimumLength.GetValueOrDefault(0), request.MaximumLength.GetValueOrDefault(1000));

            request.Results = films;

            return(View("Index", request));
        }
        // GET: Film
        public ActionResult Index()
        {
            IFilmDAL       dal        = new FilmDAL(@"Data Source=.\SQLEXPRESS;Initial Catalog=DVDStore;Integrated Security=True");
            IList <string> genres     = dal.GetGenres();
            FilmSearch     filmSearch = new FilmSearch();

            filmSearch.AddGenres(genres);
            return(View("Index", filmSearch));
        }
        /// <summary>
        /// Receives the search result request and goes to th database looking for the information.
        /// </summary>
        /// <param name="request">A request model that contains the search parameters.</param>
        /// <returns></returns>
        public ActionResult SearchResult(FilmSearch model)
        {
            /* Call the DAL and pass the values as a model back to the View */

            if (model.MinLength == null)
            {
                model.MinLength = 0;
            }

            if (model.MaxLength == null)
            {
                model.MaxLength = 1000;
            }

            model.FilmResults = dal.GetFilmsBetween(model.Genre, (int)model.MinLength, (int)model.MaxLength);

            return(View(model));
        }
        /// <summary>
        /// The request to display an empty search page.
        /// </summary>
        /// <returns></returns>
        public ActionResult Index()
        {
            FilmSearch movie = new FilmSearch();

            return(View(movie));
        }
        /// <summary>
        /// The request to display an empty search page.
        /// </summary>
        /// <returns></returns>
        public IActionResult Index()
        {
            FilmSearch filmSearch = new FilmSearch();

            return(View(filmSearch));
        }