public async Task <IActionResult> Create([Bind("ID,Title,ReleaseDate,Genre,Price,Rating,PosterURL")] Movie movie) { if (ModelState.IsValid) { _context.Add(movie); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(movie)); }
public async Task <IActionResult> Create([Bind("Reviewer,UserReview,MovieID,MovieTitle")] Review review) { if (ModelState.IsValid) { _context.Add(review); await _context.SaveChangesAsync(); return(RedirectToAction($"Details{"/" + review.MovieID}", "Movies")); } ViewData["thisMovieID"] = review.MovieID; ViewData["thisMovieTitle"] = review.MovieTitle; return(View(review)); }