public Question(string title, List<Answer> answers, QuestionType questionType, Image image = null) { Title = title; Answers = answers; QuestionType = questionType; Image = image; }
public Answer(int id, QuestionType questionType, string title, bool isCorrect = false, Image image = null) { Id = id; Title = title; IsCorrect = isCorrect; _questionType = questionType; if (image != null) Image = image.ToImage(); }
public Question(int id, string title, List<DomainModel.Entities.Answer> answers, QuestionType questionType, Image image = null) { Id = id; Title = title; Answers = answers.Select(x => x.ToAnswer(questionType)).ToList(); QuestionType = questionType; if (QuestionType == DomainModel.Entities.QuestionType.ImageQuestion) { Title = "Что на картинке?"; } if (image != null) Image = image.ToImage(); }