Ejemplo n.º 1
0
        public IHttpActionResult GetMovie(int id)
        {
            Movie movie = _dALMovie.GetMovieById(id);

            if (movie == null)
            {
                return(NotFound());
            }
            return(Ok(movie));
        }
Ejemplo n.º 2
0
        public List <Actor> GetActorsNotInMovie(int movieId)
        {
            List <Actor> allActors = _dALActor.AllActors();
            DALMovie     dALMovie  = new DALMovie();

            var movie = dALMovie.GetMovieById(movieId);

            movie.Actors.Where(a => !a.Deleted).ToList().ForEach(a => {
                allActors.RemoveAll(c => c.Id == a.Id);
            });

            return(allActors);
        }
Ejemplo n.º 3
0
        public List <Genre> GetGenresNotInMovie(int movieId)
        {
            List <Genre> allGenres = _dALGenre.AllGenres();
            DALMovie     dALMovie  = new DALMovie();

            var movie = dALMovie.GetMovieById(movieId);

            movie.Genres.Where(a => !a.Deleted).ToList().ForEach(a => {
                allGenres.RemoveAll(c => c.Id == a.Id);
            });

            return(allGenres);
        }
 public MovieDetailsViewModel(MovieDetails window, Movie currentMovie)
 {
     _movieDetailsWin    = window;
     _currentMovie       = _dALMovie.GetMovieById(currentMovie.Id);
     _currentDistributor = _dALDistributor.GetDistributorById(_currentMovie.Distributor_Id);
     _currentDirector    = _dALDirector.GetDirectorById(_currentMovie.Director_Id);
     director            = _currentDirector.Name + " " + _currentDirector.Surname;
     distributor         = _currentDistributor.Name;
     duration            = _currentMovie.Duration.ToString() + "min";
     description         = _currentMovie.Desctiprion;
     title                = _currentMovie.Title;
     _showsMovies         = _currentMovie.ShowsMovies.ToList();
     _movieReviews        = _dALReview.AllReviewsForMovie(_currentMovie.Id);
     _movieFestivalAwards = _dALAward.GetAwardsForMovie(_currentMovie.Id);
     metaScore            = _currentMovie.MetaScore;
 }