public ActionResult Index()
{
var temp = from a in _db.student
join b in _db.classes
on a.c_id equals b.id
select
new
{
Id=a.id,
Name = a.name,
Pwd = a.pwd,
Sex = a.sex,
Age = a.age,
Address = a.address,
Hobby = a.hobby,
StuName = b.name,
Direction = b.direction
};
ViewData.Model = temp.ToList();
return View();
}
怎么进行接收呢?
前台绑定报错!
前台也有数据,就是