我有以下模型,不使用继承:
问题类:
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 吗?
你会建议我什么?