public IActionResult Suggest(string movieName) { SuggestMovieInputModel model = new SuggestMovieInputModel { Name = movieName }; return(this.View(model)); }
public IActionResult Suggest(SuggestMovieInputModel input) { if (!this.ModelState.IsValid) { return(this.View("Suggest")); } this.moviesService.SuggestAMovie(input.Name, input.IMDbUrl); ViewData["Message"] = "Thank you for the suggestion, we are going to look at it and try to get the movie up as soon as possible!"; return(this.Redirect("/")); }