Пример #1
0
        public MovieDto GetMovieByTitle(string title)
        {
            var movie = _moviesRepository.GetMovieByTitle(title);

            MovieDto movieDto = null;

            if (movie != null)
            {
                movieDto = _moviesMapper.Map(movie);
            }

            return(movieDto);
        }
Пример #2
0
        public MovieDto Map(MoviePoco moviePoco)
        {
            var movie = new MovieDto
            {
                Title       = moviePoco.Title,
                Released    = moviePoco.Released,
                ImdbRating  = moviePoco.ImdbRating,
                Metascore   = moviePoco.Metascore,
                TomatoMeter = moviePoco.TomatoMeter,
                ImdbVotes   = moviePoco.ImdbVotes,
                Runtime     = moviePoco.Runtime,
                Plot        = moviePoco.Plot,
                Director    = moviePoco.Director,
                Awards      = moviePoco.Awards
            };

            return(movie);
        }