Exemplo n.º 1
0
        public int AddQuiz(User user, string Nombre)
        {
            quiz.ID_USER = user.ID_USER;
            quiz.NAME    = Nombre;
            if (!quizRepository.Add(quiz))
            {
                return(0);
            }
            DataTable dt     = quizRepository.GetSpecific("Select MAX(ID_QUIZ) AS ID FROM QUIZ");
            int       result = Convert.ToInt32(dt.Rows[0]["ID"].ToString());

            return(result);
        }