所以我的控制器中有以下操作:
public ActionResult List() {
ViewBag.Title = "View Current Stores";
var curStores =
(from store in stores.Stores
where store.CompanyID == curCompany.ID
select store).ToList();
return View(curStores);
}
假设获取商店列表并将其呈现为视图中的表格。但是 LINQ 语句引发以下错误:
Non-static method requires a target.
我该怎么办?