我有这个代码:
EmployeeEntities storeDB = new EmployeeEntities();
public ActionResult Index()
{
var employee = storeDB.Employees.ToList() //ToList is not showing up!
return View(employee);
}
我的 EmployeeEntities 类如下所示:
public class EmployeeEntities : DbContext
{
public DbSet<Employee> Employees { get; set; }
}
为什么我在 ActionResult Index() 中看不到 ToList() ???
最佳答案
关于c# - 返回查看 ToList() 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7810556/