我正在尝试构建调查系统,并希望通过代码优先的迁移在Question
模型上使用继承。
public class MultipleChoiceQuestion : Question {
public bool AllowMultipleSelection { get; set; }
public List<MCQOption> Options { get; set; }
}
即使我添加另一个DbSet<MultipleChoiceQuestion>
,它也不会出现在迁移中。我在做什么错了?