Exemplo n.º 1
0
        public void AddQuestion(QuestionDto question, string operatedBy)
        {
            var entity = QuestionFactory.CreateInstance(question.Subject, question.Remark, operatedBy);

            _questionRepository.Add(entity);
            var tags = question.Tags;

            foreach (var item in tags)
            {
                var tag = QuestionTagFactory.CreateInstance(item.Name, entity.Id);
                _questionTagRepository.Add(tag);
            }
            _dbUnitOfWork.Commit();
        }
Exemplo n.º 2
0
 public void Add(QuestionTag obj)
 {
     _repository.Add(obj);
 }