public FilmViewModel CreateFilm(FilmViewModel newFilm)
        {
            int id = filmRepository.CreateOrUpdateFilm(newFilm.Film, true);

            filmRepository.AddGenresToFilm(id, newFilm.Genres);
            filmRepository.AddCountriesToFilm(id, newFilm.Countries);
            filmRepository.AddImagesToFilm(id, newFilm.Images);

            newFilm.Film.Film_ID = id;

            return newFilm;
        }
        public FilmViewModel GetFilm(int id)
        {
            IEnumerable<ImageModel> images = filmRepository.GetFilmImages(id);

            FilmViewModel filmViewModel = new FilmViewModel
            {
                Film = filmRepository.GetFilmList().FirstOrDefault(f => f.Film_ID == id),
                Genres = filmRepository.GetFilmGenres(id),
                Countries = filmRepository.GetFilmCountries(id),
                Images = images.Where(e => e.IsCover == false),
                Cover = images.FirstOrDefault(e =>  e.IsCover == true),
                Rating = filmRepository.GetFilmRating(id)
            };

            return filmViewModel;
        }
        public void UpdateFilm(FilmViewModel updatedFilm)
        {
            int id = filmRepository.CreateOrUpdateFilm(updatedFilm.Film, false);

            filmRepository.DeleteGenresFromFilm(id);
            filmRepository.DeleteCountriesFromFilm(id);
            filmRepository.DeleteImagesFromFilm(id);

            filmRepository.AddGenresToFilm(id, updatedFilm.Genres);
            filmRepository.AddCountriesToFilm(id, updatedFilm.Countries);
            filmRepository.AddImagesToFilm(id, updatedFilm.Images);
        }