3
viewmodelのコンストラクタでビューモデルのモデル/変数を設定することをお勧めしますか?例えばMVC viewmodelコンストラクタ
:
public class ProgramViewModel
{
public IEnumerable<Programme> ProgramList { get; set; }
public string QuerystringAgeID { get; set; }
public ProgramViewModel()
{
QuerystringAgeID = HttpContext.Current.Request.QueryString["QuerystringAgeID"];
}
}