示例#1
0
        public void AddAnswer(FreetextAnswer freetextAnswer, int id)
        {
            FreetextAnswer answer = new FreetextAnswer
            {
                Answer             = freetextAnswer.Answer,
                FreetextQuestionID = id
            };

            _far.Add(answer);
        }
 public void AddFreetextAnswer(SaveFreetextAnswersModel freetextAnswersModel)
 {
     foreach (var item in freetextAnswersModel.FreetextAnswers)
     {
         if (!String.IsNullOrEmpty(item.FreetextAnswer))
         {
             FreetextAnswer freetextAnswer = new FreetextAnswer
             {
                 Answer             = item.FreetextAnswer,
                 FreetextQuestionID = item.FreetextID
             };
             _far.Add(freetextAnswer);
         }
     }
 }