Ejemplo n.º 1
0
 public void CreateHighscore(QuizHighscore item)
 {
     db.QuizHighscores.Add(item);
     db.SaveChanges();
 }
Ejemplo n.º 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();
        }