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); }
public void Insert(Question entity) { _questionDal.Add(entity); }
public void Add(Question data) { _context.Add(data); }
public IResult Add(Question question) { _questionDal.Add(question); return(new SuccessResult(Messages.Success)); }
public void Add(Question entity) { _questionDal.Add(entity); }