コード例 #1
0
        public IActionResult Index(QuoteRatingViewModel viewmodel)
        {
            // READ THIS
            // Put a breakpoint in this method and
            //  look look at the value of 'viewmodel'
            // This is where we'd save the ratings
            //  if we wanted to do that sort of thing


            return(View(viewmodel));
        }
コード例 #2
0
        public IActionResult Index()
        {
            QuoteRatingViewModel viewmodel = new QuoteRatingViewModel {
                QuoteRatings = AllQuotes.Select(q =>
                                                new QuoteRating {
                    Quote = q
                }
                                                ).ToList()
            };

            return(View(viewmodel));
        }