예제 #1
0
 /*
  * Backend work for the Approve Games page. Gets a list of all games on the "Want It" list
  * and then orders them by their votes, highest to lowest.
  */
 public ActionResult SelectGame()
 {
     _library = new GameLibrary();
     IEnumerable<Game> desiredGames = _library.GetGamesByStatus("wantit").OrderByDescending(game => game.Votes);
     GameCollection model = new GameCollection
     {
         Games = desiredGames
     };
     return View(model);
 }
예제 #2
0
 /*
  * Backend work for the Index page. Gets a list of all games on the "Want It" list
  * and then orders them by their votes, highest to lowest
  */
 public ActionResult Index()
 {
     _library = new GameLibrary();
     IEnumerable<Game> desiredGames = _library.GetGamesByStatus("wantit");
     GameCollection model = new GameCollection
     {
         Games = desiredGames
     };
     return View(model);
 }