예제 #1
0
 public static EvaluationQuestion ToModel(this EvaluationQuestionModel model, Model.Models.Term term)
 {
     if (model == null)
     {
         return(null);
     }
     return(new EvaluationQuestion
     {
         Text = model.Title,
         Term = term
     });
 }
예제 #2
0
 public static QuestionWithRelateAnswer ToModel(this EvaluationQuestionModel questionModel, List <EvaluationAnswerModel> answers)
 {
     if (questionModel == null)
     {
         return(null);
     }
     return(new QuestionWithRelateAnswer
     {
         EvaluationQuestionModel = questionModel,
         EvaluationAnswersModel = answers
     });
 }