public MovieDto GetMovieByTitle(string title) { var movie = _moviesRepository.GetMovieByTitle(title); MovieDto movieDto = null; if (movie != null) { movieDto = _moviesMapper.Map(movie); } return(movieDto); }
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); }