public MoviePoco Map(MovieTmdb movieTmdb, MovieOmdb movieOmdb) { var movieGenres = new List <MovieGenre>(); foreach (var genre in movieTmdb.Genres) { var movieGenre = new MovieGenre { Title = movieOmdb.Title, Released = movieOmdb.Released, GenreId = genre.Id }; movieGenres.Add(movieGenre); } var movie = new MoviePoco { Title = movieOmdb.Title, Released = movieOmdb.Released, ImdbRating = movieOmdb.ImdbRating, Metascore = movieOmdb.Metascore, TomatoMeter = movieOmdb.TomatoMeter, ImdbVotes = movieOmdb.ImdbVotes, Runtime = movieOmdb.Runtime, Plot = movieOmdb.Plot, Director = movieOmdb.Director, Awards = movieOmdb.Awards, MovieGenres = movieGenres }; return(movie); }
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); }