protected void GetFinalResult(IQueryable<clsProfileData> result)
{
if (ddlHeightFrom.SelectedValue != "0" && ddlHeightTo.SelectedValue != "0")
{
int from = Convert.ToInt32(ddlHeightFrom.SelectedValue);
result = result.Where(p => Convert.ToInt32(p.Height) > from);
}
}
私はEntity Framework 4.0を使用していますが、上記の方法p.Height
ではエラーが発生して変換(文字列からint)が発生します。これを処理する方法はありますか?