Esempio n. 1
0
        /// <summary>
        /// Adds a new movie
        /// </summary>
        /// <param name="movie">Object of type "Movie"</param>
        /// <returns>Flag indicating success / failure</returns>
        public bool AddMovie(Movie movie)
        {
            ValidateMovie(movie);

            if (_dataAccessLayer.MovieExists(movie.Code))
            {
                throw new ArgumentException($"A movie with the code '{movie.Code}' already exits.");
            }

            return(_dataAccessLayer.AddMovie(movie));
        }