Exemplo n.º 1
0
        public bool AddQuestion(string question)
        {
            var addQuestion = new Question()
            {
                Text = question
            };

            _questionDal.Add(addQuestion);
            return(_questionDal.SaveChanges());
        }
        public IResult Add(Question question)
        {
            var result = _questionDal.Find(p => p.Title == question.Title);

            if (result != null)
            {
                return(new ErrorResult("This Question already added"));
            }

            _questionDal.Add(question);
            return(new SuccessResult("Your Question successfully posted"));
        }
        public void Add(QuestionAddDto questionaddDto)
        {
            var question = new Question
            {
                StoryId       = questionaddDto.StoryId,
                CorrectOption = questionaddDto.CorrectOption,
                OptionA       = questionaddDto.OptionA,
                OptionB       = questionaddDto.OptionB,
                OptionC       = questionaddDto.OptionC,
                OptionD       = questionaddDto.OptionD,
                Title         = questionaddDto.Title
            };

            _questionDal.Add(question);
        }
 public void Add(Question question)
 {
     _questionDal.Add(question);
 }
Exemplo n.º 5
0
 public void Insert(Question entity)
 {
     _questionDal.Add(entity);
 }
 public void Add(Question data)
 {
     _context.Add(data);
 }
Exemplo n.º 7
0
 public IResult Add(Question question)
 {
     _questionDal.Add(question);
     return(new SuccessResult(Messages.Success));
 }
Exemplo n.º 8
0
 public void Add(Question entity)
 {
     _questionDal.Add(entity);
 }