Example #1
0
 public void AddQuestion(QuestionViewModel newQuestion)
 {
     var question = AutoMapper.Mapper.Map<QuestionViewModel, Question>(newQuestion);
     _repo.AddQuestion(question);
 }
Example #2
0
 public Question(QuestionViewModel question)
 {
     this.Id = question.Id;
     this.QuestionDescription = question.QuestionDescription;
     this.Options = question.Options.Select(o => new Option(o)).ToList();
 }