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