Ejemplo n.º 1
0
        public int SeedQuestion(int recs, AnswerGroup _answerGroup)
        {
            // default: create 5 questions for a group ... = 5*5 for each survey
            for (int i = 1; i <= recs; i++)
            {
                var row = new Question
                {
                    QGroup       = 1, //default
                    Order        = i,
                    QuestionText = "Question " + Convert.ToString(i),
                    AnswerGroup  = _answerGroup
                };

                _question.Add(row);

                int result = SeedSurveyQuestion(10, row); //rc. 10 surveys * 25 questions each
            }

            //verify result
            int count = _question.GetAll().Count();

            return(count);
        }
 public IActionResult Index()
 {
     return(View(_Question.GetAll()));
 }