前の質問に基づくと、問題はそれほど複雑ではないようです。あなたはそれを必要以上に難しくしています。必要なのは、次のような単純なモデルだけです。
public class Container {
public List<Container> Containers {get;set;}
public Question Question {get;set;}
}
public class Question {
public List<Answer> Answers {get;set;}
}
ここで推測すると、回答にはおそらく何も含めることができないため、独自のオブジェクトが必要であり、質問には回答のみを含めることができます。質問に他の質問やコンテナを含めることができる場合は、これを少し変更して機能させることができます。
これには特別なモデル バインダーは必要ありません。
単一のベースからすべてのオブジェクトを継承する必要はありません。また、奇妙なテンプレート セレクターを使用する必要もありません。
これを行うには、次のようにします。
EditorTemplates/Container.cshtml
@model Container
@Html.EditorFor(m => m.Containers)
@Html.EditorFor(m => m.Question)
EditorTemplates/Question.cshtml
@model Question
@Html.EditorFor(m => m.Answers)
EditorTemplates/Answer.cshtml
@model Answer
// whatever your answer code is.. if you have multiple answer types then you
// need a template for each type
デフォルトの MVC テンプレート システムは、これらすべてを処理し、すべてをモデル バインドします。モデルをビューに渡す前に、モデルを正しくインスタンス化する必要があります。