linq 多表查询

 1            var v_Repair = from t_repair in context.T_RPRepair
 2                            join t_top in context.TopCombine on t_repair.RoadID equals t_top.unique_id
 3                            join t_user in context.T_wxUser on t_repair.openid equals t_user.openId
 4                            select new
 5                            {
 6                                guid = t_repair.Guid,
 7                                rpId = t_repair.RoadID,
 8                                oPhoto = t_repair.oldPhotoPath,
 9                                nPhoto = t_repair.newPhotoPath,
10                                status = t_repair.status,
11                                fixTime = t_repair.fixTime,
12                                fixContent = t_repair.fixContent,
13                                reportTime = t_repair.reportTime,
14                                name = t_top.biaozhunmingcheng,
15                                type = t_top.leibiemingcheng,
16                                openid = wxId,
17                                nickName = t_user.nickname
18                            };

老是忘记 备忘一下

posted @ 2017-09-18 19:53  咖啡漩涡  阅读(401)  评论(0编辑  收藏  举报