s => s.CollectionIDFK。包含此错误,因为我想添加一个过滤器并让用户键入所需的CollectionIDFK id,程序将显示相关记录。
public ActionResult Index(string id)
{
var rugs = from s in db.Rugs
select s;
if (!String.IsNullOrEmpty(id))
{
rugs = rugs.Where(s => s.CollectionIDFK.Contains(s.CollectionIDFK));
}
return View(rugs.ToList());
}