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 IDataResult <Question> GetById(string id) { return(new SuccessDataResult <Question>(_questionDal.Find(x => x.Id == id))); }