linq查询以联接三个表 [英] linq query for joining three tables

查看:67
本文介绍了linq查询以联接三个表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有三个表table1(主表),table2,table3. table1包含table1Id,table2,而table3包含table2Id,table2RoleId,table3Id,table3RoleId.

与table1Id的值相同,table2Id和table3Id中有多个记录,但table2RoleId和table3RoleId不同.

我想将table1与table2和table3结合起来显示,就像Table2RoleId一样,并且Table3RoleId必须根据Table1Id显示.<解决方案

请参考此链接..

Master-Detail联接 [一对多加入 [ ^ ]


I have three tables table1(main table),table2,table3. table1 contains table1Id,table2 and table3 contains table2Id,table2RoleId,table3Id,table3RoleId.

with the same value of table1Id,more than one record in table2Id and table3Id but the table2RoleId''s and table3RoleId''s are different.

I want to join table1 with table2 and table3 to display like Table2RoleId and Table3RoleId has to display according to the Table1Id

解决方案

please refer this links..

Master-Detail Join[^]

One to many join[^]


这篇关于linq查询以联接三个表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆