首页 > 其他 > 详细

linq 多表查询

时间:2017-09-18 20:15:11      阅读:274      评论:0      收藏:0      [点我收藏+]
 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                            };

老是忘记 备忘一下

linq 多表查询

原文:http://www.cnblogs.com/CoffeeEddy/p/7544828.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!