public IActionResult Reviews(int id) { var test = new MovieReviewAdvancedVM(); test.ListViewModels = context.ListReviews(id); test.FormViewModel = context.GetMovieToShowOnReviewPage(id); return(View(test)); }
public IActionResult Info(int id) { var viewModel = new MovieReviewAdvancedVM(); viewModel.ListViewModels = context.ListReviews(id); viewModel.FormViewModel = context.GetMovieToShowOnReviewPage(id); //test.CreateReview = context.GetMovieToShowOnReviewPage(); viewModel.CreateReview = new ReviewCreateVM { Rates = new List <RateVm> { new RateVm { Id = 1, Rating = "1" }, new RateVm { Id = 2, Rating = "2" }, new RateVm { Id = 3, Rating = "3" }, new RateVm { Id = 4, Rating = "4" }, new RateVm { Id = 5, Rating = "5" }, new RateVm { Id = 6, Rating = "6" }, new RateVm { Id = 7, Rating = "7" }, new RateVm { Id = 8, Rating = "8" }, new RateVm { Id = 9, Rating = "9" }, new RateVm { Id = 10, Rating = "10" }, } }; return(View(viewModel)); }