Esempio n. 1
0
        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());
        }