0
私は、SurveyとPollの2つのクラスを持っています。また、質問と質問の選択科目もあります。これらをどのようにマップすると、特定のテーブル形式が出てきますか。ここには関連するクラスがあります。私が撮影してるNHibernateでこれをどのようにマップするのですか?
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; }
}
結果の表には、私は本当に流暢NHibernateのために知りたい、または単にXMLをマッピングすることは、あまりにも結構です、好ましくは以下の
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.
含まれています。
スチュアート、私はあなたが<...>間の型名をドロップすることができると思います。彼らは私が何かを逃していない限り推論されるべきです。 –
あなたはそうです、タイプを離れることができます。それは私がマッピングしているものが明らかになるように残しておくことが私の好みです。私は「多くのXからYまで」または「参照XからZまで」と読むのが好きです。 –