Пример #1
0
        public IActionResult Create()
        {
            var movieGenres            = _movieGenresService.GetAll();
            var movieGenresToViewModel = movieGenres.Select(x => x.ToMovieGenresViewModel()).ToList();
            var movieViewModel         = new CreateMovieModel();

            movieViewModel.MovieGenres = movieGenresToViewModel;
            return(View(movieViewModel));
        }
        public IActionResult GetAll()
        {
            var moviesGenre = _MovieGenreService.GetAll();

            return(Ok(moviesGenre));
        }