LINQ查询与联接 [英] linq query with join

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

问题描述

我是mvc3和linq的新手.我想获取一个团队成员的用户列表,我有3个表1.user_master(user_id,user_name),2.team_master(team_id,team_name),
3.team_to_user(team_id,user_id)如何为此编写linq查询.
对不起,我的英语.

i am new in mvc3 and linq. i want to get list of user with one team member and i have 3 tables 1.user_master(user_id,user_name),2.team_master(team_id,team_name),
3.team_to_user(team_id,user_id)how can i write linq query for this.
sorry for my english.

推荐答案

只需阅读以下参考,您将获得一些帮助:

http://msdn.microsoft.com/en-us/library/bb311040.aspx [ ^ ]
http://stackoverflow.com/questions/549734/sql-join-query-to- linq语法 [ ^ ]
http://blogs.msdn.com/b/tikiwan/archive/2010/06/18/linq-to-sql-inner-join-left-join-examples-advance-query.aspx [ http://ericfickes.com/2010/02/how -to-join-two-tables-using-linq-to-sql/ [ http://stackoverflow.com/问题/6451685/linq-left-outer-join-across-multiple-tables-retrieving-info-from-each-table [
Just go through these references you will get some help:

http://msdn.microsoft.com/en-us/library/bb311040.aspx[^]
http://stackoverflow.com/questions/549734/sql-join-query-to-linq-syntax[^]
http://blogs.msdn.com/b/tikiwan/archive/2010/06/18/linq-to-sql-inner-join-left-join-examples-advance-query.aspx[^]
http://ericfickes.com/2010/02/how-to-join-two-tables-using-linq-to-sql/[^]
http://stackoverflow.com/questions/6451685/linq-left-outer-join-across-multiple-tables-retrieving-info-from-each-table[^]

If you want exact answer of your question then please give example of what you have tried. So we can let you move on.
Happy coding..


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

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