コード例 #1
0
ファイル: MoviesController.cs プロジェクト: ArielTriana/Cine-
        public IActionResult Create(Movie movie, int rating, TimeSpan duration, int[] countries = null, int[] genres = null, int[] actors = null)
        {
            if (ModelState.IsValid)
            {
                movies.UpdateRelations(movie, rating, duration, countries, genres, actors);

                movies.AddMovie(movie);

                TempData["message"] = "Se ha creado película correctamente";

                return(RedirectToAction("Index"));
            }

            ViewBags();
            return(View());
        }