1. 程式人生 > >linq 多表查詢

linq 多表查詢

pid select rpi uniq air 備忘 多表查詢 use rtti

 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 多表查詢