// GET: MediaFile/Details/5 public ActionResult AddToPlaylist(long id) { var rez = _playlistRepository.GetAllPlaylists(); var modellist = new List<PlaylistModel>(); foreach (var item in rez) { var model = new PlaylistModel(); model.PlaylistToModel(item); modellist.Add(model); } return View(modellist); }
public ViewResult Index() { var rez = _playlistRepository.GetAllPlaylists(); var modellist = new List<PlaylistModel>(); foreach(var item in rez) { var model = new PlaylistModel(); model.PlaylistToModel(item); modellist.Add(model); } return View(modellist); }