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