用linq to sql 查询没有外键关系的两张表
vardata=frommindbc.t_machine_tfromsindbc.t_User_twherem.userName==s.userNameselectnew...
var data = from m in dbc.t_machine_t
from s in dbc.t_User_t
where m.userName==s.userName
select new
{
userName = s.userName,
userID=s.userID
}; 展开
from s in dbc.t_User_t
where m.userName==s.userName
select new
{
userName = s.userName,
userID=s.userID
}; 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询