public async Task <IActionResult> Create([Bind("Id,Name,WebSite")] Actor actor)
        {
            if (ModelState.IsValid)
            {
                _context.Add(actor);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(actor));
        }
        public async Task <IActionResult> Create([Bind("Id,Name,Genres,DirectorId,ReleaseYear")] Movie movie)
        {
            if (ModelState.IsValid)
            {
                _context.Add(movie);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["DirectorId"] = new SelectList(_context.Director, "Id", "Id", movie.DirectorId);
            return(View(movie));
        }
        public async Task <IActionResult> Create([Bind("Id,ActorId,MovieId")] MovieCastAssignment movieCastAssignment)
        {
            if (ModelState.IsValid)
            {
                _context.Add(movieCastAssignment);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["ActorId"] = new SelectList(_context.Actor, "Id", "Id", movieCastAssignment.ActorId);
            ViewData["MovieId"] = new SelectList(_context.Movie, "Id", "Id", movieCastAssignment.MovieId);
            return(View(movieCastAssignment));
        }