对于所有实体的正常读取控制器版本是:
public ActionResult Index()
{
var tmembers = db.tMembers.Include(t => t.tEducationType).Include(t => t.tRaceType).Include(t => t.tReligion);
return View(tmembers.ToList());
}
WebAPI 是:
public IQueryable<tMember> GettMembers()
{
return db.tMembers;
}
知道为什么它们不一样吗?