Example #1
0
        // GET: /<controller>/
        public IActionResult Index()
        {
            ScoreConfig c = new ScoreConfig();
            c.MaxScores = database.MaxHighScores;

            return View("Index", c);
        }
Example #2
0
        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" });
        }