public ActionResult AddSlide(int playlistId, ViewModel_AddSlideToPlaylist model) { List<Slide> Slides = slideService.GetAllSlides().ToList(); for (int i = 0; i < Slides.Count(); i++) { if (model.isSelected[i]) { playlistService.ConnectSlide(playlistId, Slides[i].SlideID); } } return RedirectToAction("Playlist", new { playlistId = playlistId }); }
public ActionResult AddSlide(int playlistId) { ViewModel_AddSlideToPlaylist model = new ViewModel_AddSlideToPlaylist(); model.Slides = slideService.GetAllSlides().ToList(); model.playlistID = playlistId; return PartialView("~/Views/Playlists/_AddSlideToPlaylistPartial.cshtml", model); }