Example #1
0
 public void CreateHighscore(QuizHighscore item)
 {
     db.QuizHighscores.Add(item);
     db.SaveChanges();
 }
Example #2
0
        public ActionResult Result(QuizResultViewmodel model, string nickname)
        {
            var highscore = new QuizHighscore() { CategoryId = model.CategoryId, DateTime = DateTime.Now, Name = nickname, Score = model.Score };
            rep.CreateHighscore(highscore);

            return RedirectToAction("Highscore", new { categoryId = model.CategoryId });
            //return View();
        }