У меня два класса: опрос и опрос. Также у меня есть классы «Вопрос» и «Выбор вопроса». Как мне их сопоставить, чтобы я выбрал определенные форматы таблиц. Вот участвующие классы.
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 тоже подойдет.