//Method to call data back from the database consisting of the player name, and their win total public ActionResult PlayersByWins() { //declaring list using model WinsPO List <WinsPO> players = new List <WinsPO>(); //Beginning of processes try { //declaring list using Model Wins in order to retrieve database information List <WinsDO> player = _dataAccess.OrderByWinCount(); //loop to get all objects assigned appropriately foreach (WinsDO dataObject in player) { //assign our PO list all of the values that were in the DO list via mapper players.Add(MapWinnersTF.WinsDOtoPO(dataObject)); } } //catch to record any exceptions that crop up catch (Exception ex) { //call to method to record necessary information ErrorFile.ErrorHandlerPL(ex); } //finally to tie up any loose ends finally { } //Sends the User to the View page return(View(players)); }