linq
两张表
User int uid ,string name
Order int id, double money,int uid
怎么样用Linq来查询两张表有关联的所有数据呢?
------解决方案--------------------var query = from u in User
join od in Order
on u.uid equals od.uid
select new
{
userid=u.uid,
username=u.name,
money=od.money
};
------解决方案--------------------var query = from u in User
join od in Order
on u.uid equals od.uid
select new
{
userid=u.uid,
username=u.name,
money=od.money
};
------解决方案--------------------var query = from u in User
join od in Order
on u.uid equals od.uid
select new
{
userid=u.uid,
username=u.name,
money=od.money
};
------解决方案--------------------楼主发了两次?