Example #1
0
        public IActionResult Melhores()
        {
            DBTop10Contexto db       = new DBTop10Contexto();
            List <Placar>   placares = db.Placares.OrderByDescending(p => p.Pontuacao).ToList();
            List <Placar>   melhores = new List <Placar>();

            for (int i = 0; (i < placares.Count && i < 10); i++)
            {
                melhores.Add(placares[i]);
            }
            return(View(melhores));
        }
 public JogadoresController(DBTop10Contexto context)
 {
     _context = context;
 }
Example #3
0
 public PlacarsController(DBTop10Contexto context)
 {
     _context = context;
 }