我遇到错误-任何人都可以帮忙吗?
对象引用未设置为对象的实例。
我的代码:
public ActionResult Detail()
{
//this list stored data selection to Compare Between them //
List<com> list = (List<com>)Session["com"];
// the specsat List to Display detial of data based on data in <list>
List<specsat> spe = new List<specsat>();
foreach (var co in list)
{
spe.Add(new specsat(db.Specs.Find(co.Ct.id)));
}
return View(spe.ToList());
}