//RETURN from < FILMS <= to public IQueryable <FilmDTO> getFilmsFromTo(int from, int to) { try { return(this._filmManager.getFilmsFromTo(from, to).Select(film => new FilmDTO() { //Actors = HelperBll.convertActors(film.Actors), Comments = HelperBll.convertComments(film.Comments), //Genres = HelperBll.convertGenres(film.Genres), Id = film.Id, PosterPath = film.PosterPath, ReleaseDate = film.ReleaseDate, Runtime = film.Runtime, Title = film.Title, VoteAverage = film.VoteAverage })); } catch (Exception) { return(null); } }
// FindListFilmByPartialActorName(…) : récupère la liste des films (List<FilmDTO>) // dans lequel l’acteur dont on donne un nom partiellement ou entièrement public IQueryable <FilmDTO> FindListFilmByPartialActorName(int from, int to, string nomActeur) { try { return(this._filmManager.FindListFilmByPartialActorName(from, to, nomActeur).Select(film => new FilmDTO() { //Actors = HelperBll.convertActors(film.Actors), Comments = HelperBll.convertComments(film.Comments), //Genres = HelperBll.convertGenres(film.Genres), Id = film.Id, PosterPath = film.PosterPath, ReleaseDate = film.ReleaseDate, Runtime = film.Runtime, Title = film.Title, VoteAverage = film.VoteAverage })); } catch (Exception) { return(null); } }