public Question Create(Question question) { EQuestion eQuestion = EQuestion(question); eQuestion = _iDQuestion.Create(eQuestion); return(Question(eQuestion)); }
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)); }
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); }