public void Add(Movie movie) { var movies = GetAll().ToList(); if (!movies.Contains(movie)) { movies.Add(movie); Save(movies); } }
public void RemoveMovie(Movie movie) { if (Movies.Contains(movie)) { _storage.Remove(movie); } else { throw new System.ArgumentException("The movie does not exist"); } }
public void Remove(Movie movie) { var movies = GetAll().ToList(); if (movies.Contains(movie)) { movies.Remove(movie); Save(movies); } else { throw new System.ArgumentException("The movie does not exist"); } }
public void AddMovie(string name) { int id = GetMovieId(); var movie = new Movie(id, name); _storage.Add(movie); }