コード例 #1
0
        public Question Create(Question question)
        {
            EQuestion eQuestion = EQuestion(question);

            eQuestion = _iDQuestion.Create(eQuestion);
            return(Question(eQuestion));
        }
コード例 #2
0
        public Question Create(int createdBy, Question question)
        {
            var eQuestion = EQuestion(question);

            eQuestion.CreatedDate = DateTime.Now;
            eQuestion.CreatedBy   = createdBy;
            eQuestion             = _iDQuestion.Create(eQuestion);
            return(Question(eQuestion));
        }
コード例 #3
0
        public void Create(int surveyId, int createdBy, List <Question> questions)
        {
            if (!questions?.Any() ?? true)
            {
                return;
            }

            List <EQuestion> eQuestion    = EQuestion(questions);
            List <EQuestion> newEQuestion = eQuestion.Where(a => a.QuestionId == 0).ToList();

            newEQuestion.ToList().ForEach(a =>
            {
                a.CreatedDate = DateTime.Now;

                a.SurveyId  = surveyId;
                a.CreatedBy = createdBy;
            });
            _iDQuestion.Create(newEQuestion);
        }