Exemplo n.º 1
0
        public async Task <IActionResult> Create(MovieViewModel movieViewModel)
        {
            if (!this.ModelState.IsValid)
            {
                return(this.View());
            }
            var newMovie = await movieServices.CreateMovieAsync(movieViewModel.Name, movieViewModel.Genres, movieViewModel.Director);

            return(this.RedirectToAction("Details", "Movie", new { id = newMovie.ID }));
        }