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; }
public PlacarsController(DBTop10Contexto context) { _context = context; }