Linq 左连接 内连接
生活随笔
收集整理的這篇文章主要介紹了
Linq 左连接 内连接
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
//左連接
from?a?in?employeeList
let?u?=?from?b?in?employeeList2
????????where?a.ID.Equals(b.ID)
????????select?a
from?c?in?u
select?c;
//內連接
from?a?in?employeeList
let?u?=?from?b?in?employeeList2
????????where?a.ID.Equals(b.ID)
????????select?a
from?c?in?u.DefaultIfEmpty()
select?c;
from?a?in?employeeList
let?u?=?from?b?in?employeeList2
????????where?a.ID.Equals(b.ID)
????????select?a
from?c?in?u
select?c;
//內連接
from?a?in?employeeList
let?u?=?from?b?in?employeeList2
????????where?a.ID.Equals(b.ID)
????????select?a
from?c?in?u.DefaultIfEmpty()
select?c;
轉載于:https://www.cnblogs.com/haoliansheng/archive/2012/09/11/2680057.html
總結
以上是生活随笔為你收集整理的Linq 左连接 内连接的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: C++中固定长度短字符串比较是否相同,忽
- 下一篇: 使用sql2005的新特性分页的储存过程