// GET: /<controller>/ public IActionResult Index() { ScoreConfig c = new ScoreConfig(); c.MaxScores = database.MaxHighScores; return View("Index", c); }
public IActionResult Index(ScoreConfig config) { database.SetMaxScores(config.MaxScores); // Clear scores? if (config.ResetScores) { database.Clear(); database.SaveChangesAsync(); } return RedirectToRoute(new { controller = "Home", action = "Index" }); }