Child
&Root
クラス間の次の構成関係を検討してください-
public class Child
{
public string ChildProperty { get; set; }
}
public class Root
{
public Child child { get; set; }
public string RootProperty { get; set; }
}
Root
クラスの厳密に型指定されたビューの作成には、プロパティは含まれません。 child
<fieldset>
<legend>Root</legend>
<div class="editor-label">
@Html.LabelFor(model => model.RootProperty)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.RootProperty)
@Html.ValidationMessageFor(model => model.RootProperty)
</div>
<p>
<input type="submit" value="Save" />
</p>
</fieldset>
子プロパティも含めるように足場テンプレートを生成するにはどうすればよいですか?
ご協力ありがとうございました。