Exemple #1
0
 public ActionResult Save([Bind(Include = "Id,ParentId,Title,Year,Rated,Released,Runtime,Genre,Director,Writer,Actors,Plot,Language,Country,Awards,Poster,Metascore,imdbRating,imdbVotes,imdbID,Type,DVD,BoxOffice,Production,Website,Response,SelectedForSave")] Movie movie)
 {
     if (_myDatabaseService.ReadAllMoviesFromDatabase().Any(m => m.imdbID == movie.imdbID))
     {
         _error.ErrorMessage = "Movie is already in MyWatchlist";
         return(View("Error", _error));
     }
     _myDatabaseService.AddMovie(movie);
     _myDatabaseService.SaveChanges();
     return(RedirectToAction("Index"));
 }