public void AddQuiz(QuizModel quiz) { var customers = _context.Set <QuizModel>(); if (quiz == null) { return; } customers.Add(new QuizModel { Question = quiz.Question, Answer = quiz.Answer, MaxPoints = quiz.MaxPoints }); _context.SaveChanges(); }
public void AddPlayer(PlayerModel player) { if (player == null) { return; } var temp = _сontext.Set <PlayerModel>(); temp.Add(new PlayerModel { FirstName = player.FirstName, LastName = player.LastName }); _сontext.SaveChanges(); }