public Task <IEnumerable <Movie> > GetAllMovies()
        {
            var moviesTask       = ImdbServiceGateway.GetAllMovies();
            var moviesFromDbTask = DataFacade.GetAllMovies();

            return(GetMoviesFromCombinedTasks(moviesTask, moviesFromDbTask));
        }
        public async Task <IEnumerable <Movie> > GetMoviesByGenre(Genre genre)
        {
            GenreParser.Validate(genre);
            var moviesFromImdbTask            = ImdbServiceGateway.GetAllMovies();
            var moviesFromDbMatchingGenreTask = DataFacade.GetMovieByGenre(genre);
            await Task.WhenAll(moviesFromImdbTask, moviesFromDbMatchingGenreTask).ConfigureAwait(false);

            var moviesMatchingGenre = moviesFromDbMatchingGenreTask.Result.ToList();

            moviesMatchingGenre.AddRange(moviesFromImdbTask.Result.Where(m => m.Genre == genre));
            return(moviesMatchingGenre);
        }
        public async Task <IEnumerable <Movie> > GetAllMovies()
        {
            var moviesTask       = ImdbServiceGateway.GetAllMovies();
            var moviesFromDbTask = DataFacade.GetAllMovies();

            await Task.WhenAll(moviesTask, moviesFromDbTask).ConfigureAwait(false);

            var movies       = moviesTask.Result;
            var moviesFromDb = moviesFromDbTask.Result;

            var moviesList = movies.ToList();

            moviesList.AddRange(moviesFromDb);
            return(moviesList);
        }