Exemplo n.º 1
0
        /// <inheritdoc cref="IMovieBase.GetAllMovies"/>
        public List <Movie> GetAllMovies()
        {
            ICollection <Movie> allMovies = _movieDao.ReadAll();

            foreach (Movie movie in allMovies)
            {
                if (!_movieCache.ContainsKey(movie.Name))
                {
                    _movieCache[movie.Name] = movie;
                }
            }

            return(_movieCache.Values.ToList());
        }