public void DeAsociateGenreMovie(string movieName, string genreName) { var mov = movieDataAccess.GetMovie(movieName); var gen = genreDataAccess.GetGenre(genreName); asociationService.DeAsociateGenreMovie(mov, gen); }
public Movie GetMovie(string name) { try { return(movieDataAcces.GetMovie(name)); } catch (DataBaseException) { return(null); } }
public bool AddFavoriteMovie(string nickName, string movieName) { try { var movieInDb = movieDataAccess.GetMovie(movieName); var userInDb = usersDataAccess.Get(nickName); if (!userInDb.FavoriteMovies.Contains(movieName)) { userInDb.FavoriteMovies.Add(movieName); } var action = $"{nickName} added {movieName} to his favorites"; loger.EventCreator("ADDFAV", action); return(true); } catch (DataBaseException) { return(false); } }
public Movie GetMovie(string name) { return(movieDataA.GetMovie(name)); }
public void Delete(string mov) { var movieToDelete = movieDataA.GetMovie(mov); movieDataA.Delete(movieToDelete); }