こんにちは、RenderAction ヘルパーを使用していて、レンダリング中に次のエラーが発生しました。
ハンドラー 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper' の子要求の実行中にエラーが発生しました。
コントローラーコード:
public ActionResult GetSearcher()
{
SearcherLines sl = new SearcherLines()
{
RegionList = db.Region.ToList(),
CategoryList = db.Category.ToList(),
SearchValue = null
};
return PartialView(sl);
}
ビューモデル
public class SearcherLines
{
public List<Region> RegionList { get; set; }
public List<Category> CategoryList { get; set; }
public string SearchValue { get; set; }
}
部分ビュー
@model IEnumerable<MasterProject.JobForYou.v3.Models.ViewModels.SearcherLines>
@foreach (var i in Model)
{
<p>@i.CategoryList</p><br />
}
助けてください。