public IActionResult Melhores() { TrabalhoLUCAISSAContext db = new TrabalhoLUCAISSAContext(); List <Placar> placares = db.Placar.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 JogadorsController(TrabalhoLUCAISSAContext context) { _context = context; }
public PlacarsController(TrabalhoLUCAISSAContext context) { _context = context; }