継承を使用せずに、次のモデルがあります:
質問クラス:
public int QuestionId { get; set; }
public string QuestionTitle { get; set; }
public bool Required { get; set; }
public int questionType { get; set; }
[ScriptIgnore]
public virtual ICollection<TextAnswer> TextAnswers { get; set; }
[ScriptIgnore]
public virtual ICollection<ParagraphAnswer> ParagraphAnswers { get; set; }
[ScriptIgnore]
public virtual ICollection<Choice> Choices { get; set; }
[ScriptIgnore]
public virtual ICollection<ChoiceAnswer> ChoiceAnswers { get; set; }
答えに継承を使用する必要がありますか?
あれは、
TextAnswer : Answer
ParagraphAnswer : Answer
ChoiceAnswer : Answer
Question クラスに ICollection が 1 つだけあるようにしますか?
あなたは私に何を提案しますか?