// GET: Musics/Create public ActionResult Create(int Id) { CommentModelsVM commentvm = new CommentModelsVM() { Comment = new CommentModels(), Music = Id, }; return(View(commentvm)); }
// GET: Comments public ActionResult Index(int Id) { CommentModelsVM vm = new CommentModelsVM() { Music = Id, Comments = new List <CommentModels>(), }; foreach (var c in db.Comments) { if (c.Music == Id) { vm.Comments.Add(c); } } return(View(vm)); }