private QuestBody CreateQuestFromCommand(CreateQuestCmd cmd)
        {
            var question = new QuestBody()
            {
                Title = cmd.Title,
                Body  = cmd.Body,
                Tags  = cmd.Tags
            };

            return(question);
        }
 public ICreateQuestResult AddQuestionIfMissing(QuestWrite state, QuestBody question)
 {
     if (state.Questions.Any(p => p.Title.Equals(question.Title)))
     {
         return(new QuestNotCreated());
     }
     if (state.Questions.All(p => p.QuestionId != question.QuestionId))
     {
         state.Questions.Add(question);
     }
     return(new QuestCreated(question));
 }
 public QuestCreated(QuestBody question)
 {
     Question = question;
 }