我有两个课程,Survey 和 Poll 课程。我也有问题和问题选择课程。我如何映射这些,以便得出特定的表格格式。以下是所涉及的课程。
public class Survey
{
public IList<Question> Questions { get; private set; }
}
public class Poll
{
public Question Question { get; set; }
}
public class Question
{
public string Text { get; set; }
public IList<QuestionChocie> Choices { get; private set; }
}
public class QuestionChoice
{
public string Text { get; set; }
}
我正在拍摄的结果表包括以下内容
Surveys- a table of survey information.
Polls - a table of polls information.
SurveyQuestions -a table of survey questions.
PollQuestions - a table of poll questions.
SurveyChoices - a table of the question choices for the surveys.
PollChoices - a table of the question choices for the survey.
最好,我真的很想知道 Fluent NHibernate,或者只是映射 xml 也可以。